1.11M Members

Get client ip address

 
0
 

Hi, i have csharp server(console application) and java client. I need to get a java client ipaddress, can someone tell me what is the function in csharp? I am new in csharp. I was searching on web and nothing help me.

 
0
 

you could always call netstat. that'll give you the ip of every machine connected to yours, and also the stat of that connection.

 
0
 

You can obtain the client IP address with the following call:

string clientConnection = ((IPEndPoint)tcpClient.Client.RemoteEndPoint).Address.ToString();

where tcpClient is your TCPClient object.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: