open session
This block is part of the realtime group and was last modified in core v15.0.2.
open session v15.0.2 Authenticates the socket with an access token and creates or resumes its session.
- flow
- token
valuerequired - resume session
value - resume seq
number - flags
object - contract flags
arrayFlags that must match for a resume: client capabilities that change what a replay must hold (a client that rebuilds a feed itself, an envelope version; mssgs's messages_via_catchup).
- device type
value - read limit
numberThe largest frame the socket accepts, in bytes; 0 keeps the entity's realtime_codec read_limit (default 1 MiB).
- flow
- success
condition - refused
value - retryable
condition - user guid
value - session id
value - resumed
condition - replayed
number - error
value
Called by the blueprint of the socket method that signs a socket in (a HELLO, a LOGIN, mssgs's INIT). Checks the token in process; refused tokens report refused (INVALID, UNAVAILABLE) and retryable. With resume_session and resume_seq it resumes that session when it belongs to the same user, was opened under the same contract_flags, is not held by a live socket, and its rooms' logs still cover the gap: the replay is then written straight after this run's answer, before any live push. Otherwise it opens a new session. Joins user:{guid} and session:{id}.
Version history
Introduced in v15.0.2.
v15.0.2: block added in this release.
Back to
realtime Return to the main group to view all sub-groups Back to socket Return to the group to view all blocks within this group