Table of Contents

Delegate AdmitHandler

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

The application's admission hook: it is handed everything a connecting client said about itself and answers with a role and limits, or a refusal.

public delegate Admission AdmitHandler(in AdmissionRequest request)

Parameters

request AdmissionRequest

What the client presented. It is a ref struct, so it cannot outlive the call.

Returns

Admission

Accept(SessionRole, SessionLimits, object) or Reject(ushort, string).

Remarks

Synchronous, and it touches no engine data. It runs on the transport thread that decoded HELLO, before the session exists, so there is no transaction to read and no tick to be inside of. Anything asynchronous — a JWT check, a database lookup — belongs to the authenticator the security work introduces (design/Subscriptions/04-transport.md § 3); anything needing engine state belongs to the system that reads SessionEvents in the tick.

Constructors

AdmitHandler(object, nint)

public AdmitHandler(object @object, nint method)

Parameters

object object
method nint

Methods

BeginInvoke(in AdmissionRequest, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(in AdmissionRequest request, AsyncCallback callback, object @object)

Parameters

request AdmissionRequest
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(in AdmissionRequest, IAsyncResult)

public virtual Admission EndInvoke(in AdmissionRequest request, IAsyncResult result)

Parameters

request AdmissionRequest
result IAsyncResult

Returns

Admission

Invoke(in AdmissionRequest)

public virtual Admission Invoke(in AdmissionRequest request)

Parameters

request AdmissionRequest

Returns

Admission