WebSocket 服务器端的抽象:WebSocket.IO

jopen 10年前

WebSocket.IO 是 WebSocket 服务器端的抽象,用于 Socket.IO。广泛支持 WebSocket 协议和规范。

示例代码:

var ws = require('websocket.io')    , server = ws.listen(3000)    server.on('connection', function (socket) {    socket.on('message', function () { });    socket.on('close', function () { });  });

Features

  • Fast

  • Minimalistic

    • Offers an integration API for higher-level impls to handle authorization, routing, etc

  • Widest support of protocols

    • Draft-75

    • Draft-76

    • Draft-00

    • Protocol version 7

    • Protocol version 8

    • Protocol version 13

  • Written for Node 0.6

项目主页:http://www.open-open.com/lib/view/home/1402820767482