Alper
Alper

Reputation: 1

Is there a way to get the Remote IP Endpoint from a TcpClient like you can in a Socket?

Anyways, in C# I'm trying to get the IP address of the remote connection of a TcpClient, similar to how you can with a socket (and its my understanding that a TcpClient is just a wrapper around a socket). How might I do that?

Upvotes: 4

Views: 6065

Answers (1)

jgauffin
jgauffin

Reputation: 101166

myClient.Client.RemoteEndPoint

http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.client.aspx

Upvotes: 7

Related Questions