Class TcpConsumer

Namespace: redb.Route.Tcp
Assembly: redb.Route.Tcp.dll

TCP consumer. Embedded TCP server that accepts connections, reads framed messages,
and dispatches them into the route processor pipeline.
Supports configurable framing (Raw, TextLine, LengthPrefixed), TLS,
max connections, and InOut exchange patterns for synchronous response.

public sealed class TcpConsumer : IConsumer

Inheritance

Object→TcpConsumer

Implements

Properties

ActiveConnections

Number of currently connected clients.

public int ActiveConnections { get; }

Endpoint

The endpoint this consumer is attached to (for diagnostics/logging).

public IEndpoint Endpoint { get; }

LocalEndPoint

The local endpoint the server is listening on. Available after Start().

public IPEndPoint? LocalEndPoint { get; }

ProcessedCount

Number of messages successfully processed.

public long ProcessedCount { get; }

Methods

Start(CancellationToken)

Starts consuming messages.

public Task Start(CancellationToken ct = default)

Stop(CancellationToken)

Stops consuming messages.

public Task Stop(CancellationToken ct = default)

Constructors