G
Guest
I have managed to use the protected methods in the .net framework.. however i
need to use the protected method ".Client". so as to get the local endpoint
of the current connected socket.
this is the code
public class MyderivedTcpClient : TcpClient
{
// Constructor for the derived class.
public MyderivedTcpClient() : base ()
{
}
public String getAddress()
{
// Calls the protected 'Client' property belonging to the TcpClient base
class.
Socket s = this.Client;
return ((IPEndPoint)s.LocalEndPoint).ToString();
}
}
What solution could you suggest??
Thanks and regards
Thomas Engerer
need to use the protected method ".Client". so as to get the local endpoint
of the current connected socket.
this is the code
public class MyderivedTcpClient : TcpClient
{
// Constructor for the derived class.
public MyderivedTcpClient() : base ()
{
}
public String getAddress()
{
// Calls the protected 'Client' property belonging to the TcpClient base
class.
Socket s = this.Client;
return ((IPEndPoint)s.LocalEndPoint).ToString();
}
}
What solution could you suggest??
Thanks and regards
Thomas Engerer