WebSocket.binaryType: The binary data type used by the connection.
WebSocket.bufferedAmount: The number of bytes of queued data.
WebSocket.extensions: The extensions selected by the server.
WebSocket.protocol: The sub-protocol selected by the server.
WebSocket.readyState: The current state of the connection.
WebSocket.url: The absolute URL of the WebSocket.
send(data): Sends data to the server over the WebSocket connection.
close([code, reason])Closes the WebSocket connection. You can optionally provide a status code and a reason for closing.
addEventListener(type, listener): Adds an event listener for a specific event type
removeEventListener(type, listener): Removes an event listener.