Skip to content

Hmp1ServerOptions

Namespace: Hex1b

Assembly: Hex1b.dll

Configures an HMP v1 server listener built via the

or

family of builder extensions.

csharp
public sealed class Hmp1ServerOptions

Inheritance

ObjectHmp1ServerOptions

Properties

OnClientConnected

Invoked after a new HMP v1 client completes its handshake.

Returns: Func<Hmp1ClientConnectedEventArgs, CancellationToken, Task>

csharp
public Func<Hmp1ClientConnectedEventArgs, CancellationToken, Task>? OnClientConnected { get; set; }

OnClientDisconnected

Invoked when a per-client session ends (clean disconnect or transport failure).

Returns: Func<Hmp1ClientDisconnectedEventArgs, CancellationToken, Task>

csharp
public Func<Hmp1ClientDisconnectedEventArgs, CancellationToken, Task>? OnClientDisconnected { get; set; }

OnPrimaryChanged

Invoked when the primary peer changes (including transitions to no-primary).

Returns: Func<Hmp1ServerPrimaryChangedEventArgs, CancellationToken, Task>

csharp
public Func<Hmp1ServerPrimaryChangedEventArgs, CancellationToken, Task>? OnPrimaryChanged { get; set; }

OnResized

Invoked when the producer's PTY dimensions change at runtime (typically as a result of a primary-peer Resize).

Returns: Func<Hmp1ServerResizedEventArgs, CancellationToken, Task>

csharp
public Func<Hmp1ServerResizedEventArgs, CancellationToken, Task>? OnResized { get; set; }

StreamTransform

Optional async stream-wrap applied to every accepted client connection before the server reads the ClientHello frame. Use this to layer TLS, compression, or other framing on top of the raw transport.

Returns: Func<Stream, Stream>>

csharp
public Func<Stream, Task<Stream>>? StreamTransform { get; set; }

Remarks

Carries an optional per-client stream wrap (TLS, compression, framing) plus single-delegate event hooks invoked over the lifetime of the server. Each hook is optional; null hooks are skipped.

Released under the MIT License.