Understand Pitaya Session features
mainPitaya uses ephemeral session instances associated with every client connection. Sessions enable asynchronous communication and state management. Key capabilities include:
- ID binding: Bind a session to a user ID so messages can be sent to a user without knowing their specific server or connection.
- Data storage: Store and retrieve data between requests.
- Message passing: Send messages to users via sessions without managing underlying connection protocols.
- Request access: Access sessions via the
contextinstance during handler requests. - Kick: Disconnect users using the
Kickmethod.