TCP Listener - Client IP?

G

Guest

Hi

I made a simple TCP Listener server application that listens to a specific
TCP port for incoming packets from a client. Everything seems to be fine. I
still don't know how to determine the client's IP address (which is the
source of the received packets).

Does anyone know how to find the client's IP address once the connection
between the server and the client is established?
 
C

Carlos J. Quintero [.NET MVP]

The System.Net.Sockets.Socket class has the RemoteEndPoint property, which
you must cast to IPEndPoint to get the IP address and port.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
 

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