xumingyong 发表于 2013-1-29 13:54:33

Websocket定义

 
看看W3C在HTML5里对于WebSocket的接口定义:
 
interface WebSocket {readonly attribute DOMString URL;// ready stateconst unsigned short CONNECTING = 0;const unsigned short OPEN = 1;const unsigned short CLOSED = 2;readonly attribute unsigned short readyState;readonly attribute unsigned long bufferedAmount;// networking         attribute Function onopen;         attribute Function onmessage;         attribute Function onclose;boolean send(in DOMString data);void close();};WebSocket implements EventTarget;
Web Sockets Now Available In Google Chrome

 
Wednesday, December 09, 2009
Labels: html5, webkit, websockets
<div class="post-body"> 
Starting in the Google Chrome developer channel release 4.0.249.0, Web Sockets are available and enabled by default. Web Sockets are "TCP for the Web," a next-generation bidirectional communication technology for web applications being standardized in part ofWeb Applications 1.0. We've implemented this feature as described in our design docs forWebKit and Chromium.
页: [1]
查看完整版本: Websocket定义