Gets the remote server
EndPoint.
public EndPoint RemoteEndPoint { get; }
Public ReadOnly Property RemoteEndPoint As EndPoint
public:
property EndPoint RemoteEndPoint {
EndPoint get();
}
Value
The
EndPoint with which the Socket is communicating.
Remarks
If you are using a connection-oriented protocol, the RemoteEndPoint property gets the EndPoint that contains the remote
IP address and port number to which the Socket is connected. If you are using a connectionless protocol,
RemoteEndPoint contains the default remote IP address and port number with which the Socket will communicate.
You must cast this
EndPoint to an
IPEndPoint before retrieving any information.
You can then call the
Address method to retrieve the remote
IPAddress, and the
Port method to retrieve the remote port number.