U
user
Hello
How can i read IP of incoming connection when i have TcpClient for that
connection ?
Thanx
How can i read IP of incoming connection when i have TcpClient for that
connection ?
Thanx
Hello
How can i read IP of incoming connection when i have TcpClient for
that connection ?
Thanx
Tim said:(IpEndPoint)socket.RemoteEndPoint.Address.ToString();
Morten said:Yes and introducing a couple of new errors too
((IpEndPoint)socket.RemoteEndPoint).Address.ToString();
Ok, i tried to create my own TcpClient class:
public class MyTcpClient: System.Net.Sockets.TcpClient
{
public MyTcpClient()
{
}
public Socket ReturnSocket()
{
return Client;
}
}
and in server.cs code i have:
MyTcpClient handler = (MyTcpClient)listener.AcceptTcpClient();
(listener is TcpListener).
It compiles, but when i start program it hangs on that line.
Why ? How can i change TcpClient to MyTcpClient so i could use
ReturnSocket() ?
Thanx again![]()
Hell
How can i read IP of incoming connection when i have TcpClient fo
that connection
Stephen said:Is there a way to get the incoming IP using a TcpClient? or is
this only available using a Socket?