How Does a Server Know If a Client Is Connected?

TIME : 2016-01-07
How Does a Server Know If a Client Is Connected?

You can verify a connection from the server side using the PING command. The idea is to send a small packet to a specific client and see whether a reply comes back.

To do this, follow the PING command with the client's name or IP address. For example:

PING 128.0.0.156 -n 4

Here, the -n 4 portion sets the number of echo requests to send—in this case, four. If the client is connected to the server, you'll receive replies containing information such as response times, confirming the link is active.