Skip to content

Clarify reconnection details in documentation #308

@ccoors

Description

@ccoors

I just had to read code because I wanted to know what happens to the session data when a client reconnects. It turns out that a client gets a new sid on reconnect and the session data is lost.

The server can maintain application-specific information in a user session dedicated to each connected client. Applications can use the user session to write any details about the user that need to be preserved throughout the life of the connection, such as usernames or user ids.

Maybe add a sentence like "Please note that in the event of a disconnect the session is deleted and lost even if a reconnect occurs, because the client will receive a new sid."

Additional quesiton:
So if I would like, for example, save the 'logged-in' state of a client in my server I would have to save that "out of band" and manage my own client IDs? So adding a whole protocol layer on top of Socket.IO? Or is there a more idiomatic way of doing it?

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions