Is it possible to retrieve the underlying hostname/port from a new TcpClient?
TcpListener listener = new TcpListener(IPAddress.Any, port);
TcpClient client = listener.AcceptTcpClient();
// get the hostname
// get the port
I've routed around in client.Client
(a System.Net.Socket
), but can't find anything out in there either. Any ideas?
Thanks all.