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.

3
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by darkagn
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.

Edited by darkagn

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.