I have a server program is running on my PC. The server program using socket to connect to many clients. Is there anyway to find out which client with witch IP is connected to the server at any time? Or how many clients are connected to the server?
Share
When you accept a socket you can get its remote IP address.
If there are multiple clients connecting from that IP, this is not enough to tell the difference. If this is an issue you can have the client send a unique id so you know which client it is.