socket.io disconnect event, client disconnect detection

I use soсket.io (transport flashsockets), the client flash application with websockets library (binary sockets). How can I detect client disconnection immediately, such as if the Internet connection is broken? Currently, the disconnect event is triggered after a delay that is set to heartbeattimeout. What happens if you turn off heartbeats? If the connection is closed from flash, then all is well.

The frontend is nginx with tcp-proxy-module. Does this require specific settings timeouts?

Upvotes: 0

Views: 1977

Answers (1)

mkto
mkto

Reputation: 4665

io.set("close timeout", 1); Refer to:https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO

Upvotes: 1

Related Questions