HTML and CSS Reference
In-Depth Information
Properties
Description
Reports the state of the connection and can take one of the
following self-explanatory values:
readyState
WebSocket.OPEN
WebSocket.CLOSED
WebSocket.CONNECTING
WebSocket.CLOSING
bufferedAmount Returns the total number of bytes that were queued when the
send() method was called
Returns the binary data format we received when the onmes-
sage event was raised
binaryType
The complete example
Here are the complete HTML and JavaScript files we used. We have omitted the
stylesheet file in order to keep the main points simple. However, you can download
the complete source code at http://pterneas.com/books/websockets/source-code .
index.html
The complete markup code for our web app page is as follows:
<!DOCTYPE html>
<html>
Search WWH ::




Custom Search