Guest User

Untitled

a guest
Apr 26th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. var clientid = 4;
  2. io = require('socket.io-client')
  3. var socket = io("http://myserverurl:2000/"+clientid,{reconnection:true})
  4. socket.on('connect_error', function () { socket.reconnect; });
  5.  
  6. var ab_io = require('socket.io').listen(2000);
  7. var nsp = ab_io.of('/'+data.client)
  8. nsp.on('connection', function(socket){
  9. console.log('connected to network device for client with ID:' + data.client)
  10. })
Add Comment
Please, Sign In to add comment