六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 302|回复: 0

Websocket定义

[复制链接]

升级  51.33%

37

主题

37

主题

37

主题

秀才

Rank: 2

积分
127
 楼主| 发表于 2013-1-29 13:54:33 | 显示全部楼层 |阅读模式
 
看看W3C在HTML5里对于WebSocket的接口定义:
 
interface WebSocket {  readonly attribute DOMString URL;  // ready state  const 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

[size=1.6em] 
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.
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表