Friday, January 20, 2017

Force client disconnect by socket id

Leave a Comment

I'd like to force client disconnect by socket id using socket.io-redis. I tried a lot of research in google, but methods mentioned in old topics does not work.

Let's say, I'm making clustered application and my code at the moment runs at cluster1 instance (also I have access to all connected client's socket ids), but the client is connected to cluster2 instance. How can I force disconnect to that client by socket id only?

1 Answers

Answers 1

I've implemented it by myself and pulled in the socket.io-redis repo. Method name is remoteDisconnect.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment