The open event is fired when a connection with a WebSocket is opened.
The message event is fired when data is received through a WebSocket.
The close event is fired when a connection with a WebSocket is closed.