Answer the question
In order to leave comments, you need to log in
What are the main features of socket.io?
Hello. I am using nodejs. For example, there is a code io.sockets.on( 'connection', function( client ) {
that responds when users connect. What code will respond when users disconnect? And what else is there?
Answer the question
In order to leave comments, you need to log in
io.sockets.on('connection', function (socket) {
socket.on('disconnect', function () {
// ...
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question