hi!
i use tcpclient to get connections from clients to my server. but i need the information of the ip address of that client. i know that i have to derive a mytcpclient from the tcpclient class, but i get some errors when extracting the socket out of it. the following code was done by me, but it won´t work!
class mytcpclient : tcpclient
{
public mytcpclient(TcpClient client)
{}
public new Socket Client
{
get {return base.Client;}
}
}
now the code in the main:
TcpClient client = new TcpClient;
mytcpclient mclient = new MyTcpClient(client);
Socket s = mclient.Client; <--------- using a method of this
client comes up with an error, that there is no instance to that object or so.
can someone please help me? i really need to use tcpclient and to extract that socket to get the remote ip addy!
thany, gry