Skip to content

ConnectionOptions

Namespace: E2E.Engine.Protocol

public sealed record ConnectionOptions : IEquatable<ConnectionOptions>

How a connection handles what arrives on it. Upstream’s ConnectionOptions.

Inheritance: object

Implements: IEquatable<ConnectionOptions>

View source

public Func<Exception, RpcErrorObject>? EncodeError { get; init; }

Encodes a handler failure; defaults to an internal error carrying the message.

Value: Func<Exception, RpcErrorObject>

public IReadOnlyDictionary<string, Action<JsonNode?>>? Notifications { get; init; }

Handles one incoming notification by method.

Value: IReadOnlyDictionary<string, Action<JsonNode>>

public Action<string>? OnClose { get; init; }

Called once when the input ends or fails, after every pending request was rejected.

Value: Action<string>

public Action<string, Exception>? OnNotificationError { get; init; }

Called with what a notification handler threw: a notification has no reply to carry it.

Value: Action<string, Exception>

public IReadOnlyDictionary<string, Func<JsonNode?, Task<JsonNode?>>>? Requests { get; init; }

Answers one incoming request by method; what a handler throws becomes the error response.

Value: IReadOnlyDictionary<string, Func<JsonNode, Task<JsonNode>>>