Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 .NET4 WinForm
Hi,
 
I need to create a client server based software (desktop).
 
There would be multiple client with different IP Address, but same port number.
 
eg-
 
client A has ip:172.21.5.2 with port number:5555
client B has ip:172.21.5.3 with port number:5555
client C has ip:172.21.5.4 with port number:5555
client D has ip:172.21.5.5 with port number:5555
 
and
 
server has ipddress:172.21.5.1 with port number:5555.
 
Now I need to create a communicate link between client A, B, C and D with the server.
 
Could someone please help me ?
 
Thanks in Advance.
Smile | :)
Posted 14-Mar-13 22:54pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is the most common scenario. There are several good examples you could find with google?
Start here: Working with Sockets in C#[^]
But as you have not specified anything further regarding your application, this is much the most I could suggest.
So what have you tried so far?
Please note, that you can not specify client port by design of tcp/ip stack. Ant it makes also no sense at all trying to do so. Why do you think you need this?
  Permalink  
Comments
Member 7849477 at 15-Mar-13 4:23am
   
@Zoltán Zörgő
 
thanks for the reply.... :)
 
i am developing a LAN based Collaboration software... where user can login from any registered systems and start their work... they can create task,notes.. send message to other users... chat with each other...
 

Sir, could you give me a simple example of server having a different ipaddress and client having a different ipaddress..
[using TCPCLient and TCPListener... i don't want to use ASCallback thing..]
 
PLEASE guide me with this... :)
Zoltán Zörgő at 15-Mar-13 5:57am
   
Don't you think, that your current knowledge level is far too low for such a task? If you ask such questions, you are far-far away from what you desire to achieve. I suggest you start with a little bit simpler task.
By the way, according to current main stream, such applications are better to be made as HTML5 thin client applications than thick ones. Please consider this alternative too.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 299
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 205
3 Aajmot Sk 202
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 15 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100