darknuke
Well-known member
- Joined
- Oct 3, 2003
- Messages
- 68
How can I find a clients IP connected to my server (using a TCP socket)?
s.Connect(lep);
// Using the LocalEndPoint property.
Console.WriteLine("My local IpAddress is :" + IPAddress.Parse(((IPEndPoint)s.LocalEndPoint).Address.ToString()) +
"I am connected on port number " + ((IPEndPoint)s.LocalEndPoint).Port.ToString());