Get ip address from TcpClient

To get ip address from a TcpClient do the following:

IPEndPoint ipend = (IPEndPoint)mytcpclient.Client.RemoteEndPoint;
Console.WriteLine(ipend.Address.ToString());
Categories: C# Tags: , , , , ,
%d bloggers like this: