12. API
var ws = new WebSocket("ws://example.com/service");
ws.onopen = function() {
// Web Socket is connected. You can send data by send() method.
ws.send("message to send"); ....
};
ws.onmessage = function (evt) { var received_msg = evt.data; ... };
ws.onclose = function() { // websocket is closed. };
http://dev.w3.org/html5/websockets/
11 8 15
17. Google
Ian Hickson editor of HTML5 specification
Reducing kilobytes of data to 2 bytes…and reducing latency
from 150ms to 50ms is far more than marginal. In fact, these
two factors alone are enough to make WebSocket seriously
interesting to Google.
2 150ms
50ms
2
WebSocket Google
11 8 15