Kick socket/user - server side Socket.io v0.9

192 views
Skip to first unread message

Kamil Krzyszczuk

unread,
Oct 26, 2012, 8:58:17 PM10/26/12
to sock...@googlegroups.com
How to do it?

Is it a good way: socket.onDisconnect(); ?

I use Redis and Cluster module, I use rooms too. And sometimes I have dead sockets, that server should remove from list of sockets, but he doesn't. So i'm trying to find a reason of dead sockets, and maybe this kicking user above is wrong?

Daniel Baulig

unread,
Nov 8, 2012, 12:36:04 PM11/8/12
to sock...@googlegroups.com
Note though, if I recall correctly and this behavior hasn't changed since, kicking sockets from namespaces will never close the connection, even if this was the "last" (that is the last non-default) namespace the socket was connected to. Just take this into consideration if you are working on namespaces primarily.

See this comment from earlier this year:

Regards,
Daniel

From: Alex Noble <swi...@gmail.com>
Reply-To: <sock...@googlegroups.com>
Date: Tuesday, November 6, 2012 5:24 PM
To: <sock...@googlegroups.com>
Subject: Re: Kick socket/user - server side Socket.io v0.9

This may be of help to you:

Reply all
Reply to author
Forward
0 new messages