Struct SessionEvent
One thing that happened to one session, as an application system reads it in the tick.
public readonly struct SessionEvent
- Inherited Members
Remarks
A single struct rather than one type per kind: the batch is a flat span an application walks with a switch, which keeps the read allocation-free and
keeps the ordering between an Opened and a Closed visible — a session that opens and closes
inside one tick produces both, in that order, and an application that only handles one of them would otherwise leak whatever it built.
Properties
AppData
Whatever the admission hook attached to this session.
public object AppData { get; }
Property Value
CloseCode
The close code the client was given.
public ushort CloseCode { get; }
Property Value
HelloPayload
The client's HELLO payload, copied out of the transport's buffer. Empty when it sent none.
public ReadOnlyMemory<byte> HelloPayload { get; }
Property Value
Kind
What happened.
public SessionEventKind Kind { get; }
Property Value
Limits
The limits admission asked for — the object the hook handed back, not the resolved numbers.
public SessionLimits Limits { get; }
Property Value
Principal
public ClaimsPrincipal Principal { get; }
Property Value
Reason
Why it ended. Meaningful on Closed.
public SessionCloseReason Reason { get; }
Property Value
Resumable
Whether the client may come back to this session within the grace period.
public bool Resumable { get; }
Property Value
ResumedFrom
The session this one resumed, or None. Filled when resume is built.
public SessionId ResumedFrom { get; }
Property Value
Role
The role admission gave it. Meaningful on Opened.
public SessionRole Role { get; }
Property Value
Session
Which session it happened to.
public SessionId Session { get; }
Property Value
SessionKind
The application-declared kind the client presented.
public string SessionKind { get; }
Property Value
Methods
ToString()
public override string ToString()