{
Socket s = cln.Client;
return s;
}
{
string ip = GetSocket(cln).RemoteEndPoint.ToString().Split(':')[0];
return ip;
}
{
string temp = GetSocket(cln).RemoteEndPoint.ToString().Split(':')[1];
int port = Convert.ToInt32(temp);
return port;
}
Socket s = tc.Client;
Console.WriteLine("I am connected to " +
IPAddress.Parse(((IPEndPoint)s.RemoteEndPoint).Add ress.ToString()) +
"on port number " + ((IPEndPoint)s.RemoteEndPoint).Port.ToString());