Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.0 C#4.0
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 3-Jan-12 7:58am
Edited 6-Jan-12 11:20am
v3
Comments
SAKryukov at 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
anpo1988 at 3-Jan-12 13:07pm
   
I need that the server detect Automatically the client without configuration, do you understand me or not?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Firstly try making use of Google "C# client server".
Secondly this may be urgent to you but it is not to us.
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 515
1 Maciej Los 290
2 Richard MacCutchan 265
3 BillWoodruff 235
4 Suraj Sahoo | Coding Passion 175
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 6 Jan 2012
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