I'm new to socket.io 1.1. From what I understand, upon connection loss/disconnection, the server-side socket automatically leaves all rooms and disconnect
is fired. By the time disconnect
is fired, socket.rooms
is already cleared.
I would like to announce to the previously joined rooms that the current user had left. Are those previously connected room ids stored somewhere? Alternatively, is there some sort of onLeaveRoom
or beforeDisconnect
mechanism built into socket.io where the room ids can be intercepted?
Thanks for your help!