c# - Find Out Connected clients IP's? -


How do I find out the connected customer's IP address and we will call that address to IPAddress ?

Check your socket:

If you are using a connection-oriented protocol, the endpoint of the remote pointpoint property has a remote IP address and port number in which the socket is connected. If you are using a connectionless protocol, then the remotepointpoint has the default remote IP address and port number with which the socket will communicate. Before you can get any information you need to put this endpoint in an IPEndPoint. After this, you can call the IPPpoint. IPEndPoint.Port method to obtain address method and remote port number to get remote IP address

If you use high level components such as TCPListon and TCP Client, then you can obtain the remote end point and retrieve it.

If you use other technologies like ASP.Net, WCF or Remoting, then you have to say in your post.

Recover by using the built-in bytes to store an IPadress, you can rebuild the address from the bytes using.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -