PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

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

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 13 lines | 10 code | 3 blank | 0 comment | 0 complexity | bc83caec1dba8a6e2b176f8132aeab84 MD5 | raw file
 1var sys = require('sys');
 2var ws = require('websocket-server/ws');
 3
 4var srv = ws.createServer({ debug : true});
 5srv.addListener('connection', function(s) {
 6    sys.debug('Got a connection!');
 7
 8    s._req.socket.addListener('fd', function(fd) {
 9        sys.debug('Got an fd: ' + fd);
10    });
11});
12
13srv.listen(process.argv[2]);