Answer the question
In order to leave comments, you need to log in
Why takes a long time to connect to socket io nodejs?
Online:
var socket = io("http://ip:port/");
socket.on('connect', function(data){
console.log('Connected to server!');
});
io.sockets.on('connection', function (socket) {
online++;
socket.on('disconnect', function(){
online--;
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question