node-simple-router
Version:
Yet another minimalistic router for node.js
20 lines (13 loc) • 460 B
JavaScript
// Generated by CoffeeScript 1.10.0
(function() {
var WebSocketClientConnection, ws;
WebSocketClientConnection = require('../src/ws').WebSocketClientConnection;
ws = new WebSocketClientConnection('ws://echo.websocket.org');
ws.readyState;
ws.on('close', function(code) {
return console.log("Socket closed", code);
});
ws.on('data', function(opcode, data) {
return console.log("OPCODE:", opcode, "DATA:", data);
});
}).call(this);