Manage Client Sessions
When the server accepts a client, the plugin assigns it a unique SessionChannel in "IP:Port" format.
Subscribe to client connection and disconnection events
| Node Function | Description |
|---|---|
BindConnectHandle | Bind delegate for client connect/disconnect |
UnbindConnectHandle | Unbind a specific connection delegate |
UnbindAllConnectHandle | Unbind all connection delegates |
List sessions and check their connection state
Once the listener starts, check that the client connected to the right channel, then use GetAllSessions to see the current sessions. Before sending to a client, check the selected session with IsSessionConnected. Read the list again after a reconnect.
| Node Function | Description |
|---|---|
GetAllSessions | Get all current SessionChannels on a listening channel |
IsSessionConnected | Check if a session is still connected |
When session sockets are created and destroyed
The plugin creates a session socket when it accepts a client. The session ends when the client disconnects or the socket is destroyed. The plugin handles socket cleanup.
