Create and return internal session.
uniqe id for the internal session
frontend server in which the internal session is created
the underlying socket would be held by the internal session
Iterate all the binded session in the session service.
callback function to fetch session
Iterate all the session in the session service.
callback function to fetch session
Get client remote address by session id.
session id
remote address of client
Get sessions' quantity in specified server.
Import the key/value into session.
Import new value for the existed session.
Kick all the session offline under the user id.
user id asscociated with the session
callback function
Kick a user offline by session id.
session id
callback function
Remove session by key.
The session id
Send message to the client by session id.
session id
message to send
Send message to the client by user id.
userId
message to send
Session service maintains the internal session for each client connection.
Session service is created by session component and is only available in frontend servers. You can access the service by
app.get('sessionService')
orapp.sessionService
in frontend servers.constructor parameters