Click here to Skip to main content
15,912,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help me to program a project server/client in C#.
the problem is how to detect a IP of a client in my server, and the server detect all PC connect in the same network of the server..
thanks for advance!!!
Posted
Updated 6-Jan-12 10:20am
v3
Comments
Sergey Alexandrovich Kryukov 3-Jan-12 13:02pm    
Why do you need the client IP? If you use TCP and the client is connected, you don't need it. What level of networking are you going to use?
--SA
ANOUAR JLIDI 3-Jan-12 13:07pm    
I need that the server detect Automatically the client without configuration, do you understand me or not?

Firstly try making use of Google "C# client server".
Secondly this may be urgent to you but it is not to us.
 
Share this answer
 
v3
There are some architectures that do kind of a auto configuration.
This may base on broadcasting a request in the LAN and all clients are advised to respond.

This becomes far more tricky if you have dynamically coming and going server/client nodes and you want this to work reliably.

E.g. check the DLNA protocols, UPnP, or on a completely different technology: the FireWire Configuration Mechanisms.

If you go that path by inventing the weel yourself, and if you aim to a reliable system, this approach opens the box of pandora:

  • handle slow responding clients
  • deal with network dropouts (e.g. WIFI issues)
  • deal with re-connecting clients after a client crash or network dropout (the client did not say bye-bye before leaving the network, so, you need to be able to distinguish conflicts and re-connections (use the "bye-bye hello" pattern?)
  • nasty timeout issues (don't slow down the configuration by non-cooperative clients)
  • avoid broadcast event storms (do not re-configure too often)
  • ...


So, if you have no real requirement that the server knows up-font all (potential) clients: don't go that path.

It will cost you a lot of time and money to get the sytem running in a decent way.

Cheers

Andi
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900