PageRenderTime 36ms CodeModel.GetById 23ms RepoModel.GetById 0ms 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
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. var sys = require('sys');
  2. var ws = require('websocket-server/ws');
  3. var srv = ws.createServer({ debug : true});
  4. srv.addListener('connection', function(s) {
  5. sys.debug('Got a connection!');
  6. s._req.socket.addListener('fd', function(fd) {
  7. sys.debug('Got an fd: ' + fd);
  8. });
  9. });
  10. srv.listen(process.argv[2]);