Class TcpEndpointOptions

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

Options for the TCP endpoint. Shared by both producer and consumer.
Use URI parameters to configure: tcp:host:port?textLine=true&delimiter=\n

public class TcpEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→TcpEndpointOptions

Inherited Members

Properties

Backlog

Listen backlog for the TCP server. Default: 128.

public int Backlog { get; set; }

ClientCertPassword

Password for .

public string? ClientCertPassword { get; set; }

ClientCertPath

Producer only: PFX client certificate presented to a server that requires mTLS. Distinct

public string? ClientCertPath { get; set; }

ConnectionFactory

Named from the route registry. Lets the TLS certificate

[RegistryReference(typeof(TcpConnectionFactory))]
public string? ConnectionFactory { get; set; }

ConnectTimeout

Connect timeout in milliseconds. Default: 10000 (10s). 0 = infinite.

public int ConnectTimeout { get; set; }

Delimiter

Delimiter for TextLine framing. Default: "\n".

public string Delimiter { get; set; }

Encoding

Text encoding name for TextLine framing and string body conversion. Default: utf-8.

public string Encoding { get; set; }

Framing

Message framing mode. Default: Raw.

public TcpFraming Framing { get; set; }

Host

Remote host (producer) or bind host (consumer). Parsed from URI path.

public string Host { get; set; }

InOut

If true, the consumer returns the exchange Out body as the TCP response (InOut pattern).

public bool InOut { get; set; }

KeepAlive

TCP keep-alive. Default: true.

public bool KeepAlive { get; set; }

LengthPrefixed

Shortcut: set to true to use LengthPrefixed framing.

public bool LengthPrefixed { get; set; }

MaxConnections

Maximum concurrent client connections. 0 = unlimited. Default: 0.

public int MaxConnections { get; set; }

MaxReconnectAttempts

Maximum reconnect attempts. 0 = unlimited. Default: 0.

public int MaxReconnectAttempts { get; set; }

NoDelay

Disable Nagle's algorithm for low-latency. Default: true.

public bool NoDelay { get; set; }

Port

Remote port (producer) or bind port (consumer). Parsed from URI path.

public int Port { get; set; }

ReceiveBufferSize

Socket receive buffer (SO_RCVBUF) in bytes. Default 0: the system sizes the buffer and grows it with the

public int ReceiveBufferSize { get; set; }

Reconnect

Auto-reconnect on disconnect. Default: false.

public bool Reconnect { get; set; }

ReconnectInterval

Interval between reconnect attempts in milliseconds. Default: 5000.

public int ReconnectInterval { get; set; }

SendBufferSize

Socket send buffer (SO_SNDBUF) in bytes. Default 0: the system sizes the buffer.

public int SendBufferSize { get; set; }

Ssl

Enable TLS encryption. Default: false.

public bool Ssl { get; set; }

SslCertPassword

Password for the PFX certificate.

public string? SslCertPassword { get; set; }

SslCertPath

Path to PFX certificate file for TLS (consumer). Required when ssl=true for consumer.

public string? SslCertPath { get; set; }

SslTargetHost

Target host name for TLS server certificate validation (producer).

public string? SslTargetHost { get; set; }

TextLine

Shortcut: set to true to use TextLine framing.

public bool TextLine { get; set; }

TrustAllCertificates

Producer only: accept any server certificate, including a self-signed one. Off by default

public bool TrustAllCertificates { get; set; }

Methods

Validate()

Validates required parameters and constraints. Called after BindFromUri.

public override void Validate()