Table of Contents

Struct AdmissionRequest

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

What a connecting client presented, as the application's admission hook sees it.

public readonly ref struct AdmissionRequest
Inherited Members

Remarks

Nothing here is interpreted by the engine. Kind is checked against the declared set and no further; Token is opaque bytes the engine never reads. In the first version there is no engine-side security at all (design/Subscriptions/03-wire-protocol.md § 12 W22), which is why Principal is always null today: the asynchronous authenticator that produces one arrives with the security work.

A ref struct on purpose. The hook cannot stash the request, capture it in a closure or hand it to another thread — which is the compiler enforcing the rule that admission is synchronous and stateless rather than a comment asking for it.

Constructors

AdmissionRequest(string, string, uint, ReadOnlySpan<byte>, SessionLimits, object, EndPoint, string)

Creates a request. The transport builds one per HELLO; a test builds one directly.

public AdmissionRequest(string kind, string token, uint requestedCaps, ReadOnlySpan<byte> helloPayload, SessionLimits requestedLimits, object appData, EndPoint remote, string transport)

Parameters

kind string

The application-declared name the client presented, or an empty string when it named none.

token string

The client's opaque credential. Never read by the engine.

requestedCaps uint

The capability bits the client asked for. Granted ⊆ requested ∩ known ∩ authorized.

helloPayload ReadOnlySpan<byte>

The client's application payload, at most HelloPayloadMaxBytes bytes.

requestedLimits SessionLimits

Limits proposed ahead of the hook. null means the operator's defaults.

appData object

Application data produced before the hook — the authenticator's, when one exists.

remote EndPoint

The client's address, as the transport sees it.

transport string

The transport's name: tcp, ws, webtransport, fake.

Properties

AppData

Application data produced before the hook — the authenticator's, when one exists. null in the first version.

public object AppData { get; }

Property Value

object

HelloPayload

The client's application payload. It is borrowed from the transport's buffer and must be copied to be kept.

public ReadOnlySpan<byte> HelloPayload { get; }

Property Value

ReadOnlySpan<byte>

Kind

The application-declared kind the client presented. Empty when it named none.

public string Kind { get; }

Property Value

string

Principal

The authenticated principal. Always null until the security work lands an authenticator.

public ClaimsPrincipal Principal { get; }

Property Value

ClaimsPrincipal

Remote

The client's address. null for an in-process link.

public EndPoint Remote { get; }

Property Value

EndPoint

RequestedCaps

The capability bits the client asked for.

public uint RequestedCaps { get; }

Property Value

uint

RequestedLimits

Limits proposed before the hook ran. The hook is free to hand back different ones.

public SessionLimits RequestedLimits { get; }

Property Value

SessionLimits

Token

The client's opaque credential, at most TokenMaxBytes bytes on the wire.

public string Token { get; }

Property Value

string

Transport

The transport's name: tcp, ws, webtransport, fake.

public string Transport { get; }

Property Value

string