S
S
Space2014-03-14 12:40:10
JavaScript
Space, 2014-03-14 12:40:10

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

2 answer(s)
D
Denis Pushkarev, 2014-03-14
@ruslite

io.sockets.on('connection', function (socket) {
  socket.on('disconnect', function () {
    // ...
  });
});

Everything is off. site and wiki .

L
lxfr, 2014-03-14
@lxfr

read socket.io here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question