WebSocket
The WebSocket
object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
Constructors
Properties
The WebSocket.binaryType
property controls the type of binary data being received over the WebSocket connection.
The WebSocket.bufferedAmount
read-only property returns the number of bytes of data that have been queued using calls to send()
but not yet transmitted to the network.
The WebSocket.extensions
read-only property returns the extensions selected by the server.
The WebSocket.readyState
read-only property returns the current state of the WebSocket connection.
Functions
The WebSocket.send()
method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of bufferedAmount
by the number of bytes needed to contain the data.