Table of Contents

Delegate CommandOffTick<T>

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Handles a command on the transport thread that received it, instead of delivering it to a tick: the control plane of an application — the "resume" a client sends to a paused engine, which no tick would ever drain.

public delegate void CommandOffTick<T>(SessionId session, in T command) where T : unmanaged

Parameters

session SessionId

The session that sent it, already checked against the declaration's roles, rate and pre-check.

command T

The decoded command.

Type Parameters

T

The command type.

Remarks

It runs on a receive thread, outside any tick, while the engine may be held. It may call TyphonRuntime.RequestPause, Resume, Step (without awaiting it) and set TimeScale — the calls that never block. It must not block, must not touch session state, and must not read or write the database (EW-02): anything that needs the world is a tick's job, queued with WriteInTick or sent as an ordinary command.

Its sequence number settles lastSeq with the next frame. A handler that throws is answered with a REJECTED ACK and counted; the connection stays open.

Constructors

CommandOffTick(object, nint)

public CommandOffTick(object @object, nint method)

Parameters

object object
method nint

Methods

BeginInvoke(SessionId, in T, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(SessionId session, in T command, AsyncCallback callback, object @object)

Parameters

session SessionId
command T
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(in T, IAsyncResult)

public virtual void EndInvoke(in T command, IAsyncResult result)

Parameters

command T
result IAsyncResult

Invoke(SessionId, in T)

public virtual void Invoke(SessionId session, in T command)

Parameters

session SessionId
command T