A sent ping indicates a request that the sender wants to receive a pong. A pong is a response to a ping. Pongs may be sent unsolicited, at any time. One use for an unsolicited pong is to inform the remote peer that the session is still active after a long period of inactivity. A close frame indicates that the remote peer wishes to close the WebSocket connection. The connection is considered gracefully closed when each side has sent and received a close frame.
A sent ping indicates a request that the sender wants to receive a pong. A pong is a response to a ping. Pongs may be sent unsolicited, at any time. One use for an unsolicited pong is to inform the remote peer that the session is still active after a long period of inactivity. A close frame indicates that the remote peer wishes to close the WebSocket connection. The connection is considered gracefully closed when each side has sent and received a close frame.