You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// clientvarsocket=io();socket.on('connection',function(){socket.emit('info',data);});socket.on('get_info',function(data){console.log(data)});// server codeio.on('connection',function(socket){socket.on('info',function(data){socket.emit('get_info',data)});});
That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).
io.on('connection', function(socket) {
socket.emit('info', callback)
}
Client doesn't receive 'info'. I must ask the server for info from the client, first in order to receive anything, having server code like this:
io.on('connection', function(socket) {
socket.on('askforinfo', function(msg) {
socket.emit('info', {name: 'Peter Park' })
});
Obviously this is undesirable. The fact is that "emit" "on connection" is bugged.
The text was updated successfully, but these errors were encountered: