Click here to Skip to main content
11,496,012 members (67,341 online)
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 Dnyaneshwar@Pune 692
1 CHill60 318
2 RyanDev 230
3 Sascha Lefèvre 205
4 OriginalGriff 171
0 Sergey Alexandrovich Kryukov 10,372
1 OriginalGriff 8,871
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 6 Jan 2012
Copyright © CodeProject, 1999-2015
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