Get remote TcpClient address

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
 
M

MuZZy

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top