Sends data to the server using a WebSocket connection.
- data [in]
Sends a string to the server
Sends a binary stream of data to the server. See msStreamReader.readAsBlob.
Sends a generic fixed-length binary data buffer to the server.
Sends a variable-length A typed array view of an ArrayBuffer to the server.
This method does not return a value.
An ArrayBufferView is a typed array view of an ArrayBuffer. An ArrayBuffer is a unformatted block of raw data that is sent in its entirety to a server. By using a typed array to define the format of the buffer, and the start and length (number of elements), you can send portions of an ArrayBuffer to a server.
var buf = new ArrayBuffer(100); var firstFourBytes = new Uint8Array(buf, 0, 4); socket.send(firstFourBytes);
This method can throw one of the following exceptions:
|InvalidStateError(11)||The connection is not currently OPEN.|
- WebSockets in Windows
- WebSockets RFC 6455
- The WebSocket API