Get remote TcpClient address

  • Thread starter Thread starter MuZZy
  • Start date Start date
M

MuZZy

HI,

How do i get a remote TcpClient address here?

// =======================================
TcpListener l = new TcpListener(IPAddress.Parse("127.0.0.1"), 8080);
TcpListener.Start();

While (true)
{
TcpClient cl = l.AcceptTcpClient();

<Here i need to get the client's ip address>
}
// =======================================

Any suggestions would be highly appreciated!

Thankyou,
Andrey
 
MuZZy said:
HI,

How do i get a remote TcpClient address here?

// =======================================
TcpListener l = new TcpListener(IPAddress.Parse("127.0.0.1"), 8080);
TcpListener.Start();

While (true)
{
TcpClient cl = l.AcceptTcpClient();

<Here i need to get the client's ip address>
}
// =======================================

Any suggestions would be highly appreciated!

Thankyou,
Andrey

Well, i replaced TcpClient with a Socket object and now the problem is solved!
Thank you for reading my post anyway!
 
Back
Top