Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var clientid = 4;
- io = require('socket.io-client')
- var socket = io("http://myserverurl:2000/"+clientid,{reconnection:true})
- socket.on('connect_error', function () { socket.reconnect; });
- var ab_io = require('socket.io').listen(2000);
- var nsp = ab_io.of('/'+data.client)
- nsp.on('connection', function(socket){
- console.log('connected to network device for client with ID:' + data.client)
- })
Add Comment
Please, Sign In to add comment