PageRenderTime 269ms CodeModel.GetById 90ms app.highlight 2ms RepoModel.GetById 129ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/node-websocket-client/examples/client.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 10 lines | 9 code | 1 blank | 0 comment | 0 complexity | 30df83a446902b2e9670a635a1f258a7 MD5 | raw file
 1var sys = require('sys');
 2var WebSocket = require('../lib/websocket').WebSocket;
 3
 4var ws = new WebSocket('ws://localhost:8000/biff', 'borf');
 5ws.addListener('data', function(buf) {
 6    sys.debug('Got data: ' + sys.inspect(buf));
 7});
 8ws.onmessage = function(m) {
 9    sys.debug('Got message: ' + m);
10}