Is socket.io emit callback appropriate?
问题 Recently I have been messing around with socket.io and found this interesting thing, that I can have emit function callback like this. I start emitting on client side like this: client.emit('eventToEmit', dataToEmit, function(error, message){ console.log(error); console.log(message); }); Then I can fire a callback from server-side like this: client.on('eventToEmit', function(data, callback){ console.log(data); callback('error', 'message'); }); Everything works fine with no errors, but I am