Class TcpBuilder

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

Fluent builder for TCP endpoint URIs. Scheme: tcp.

public sealed class TcpBuilder

Inheritance

Object→TcpBuilder

Methods

Backlog(int)

TCP listen backlog. Default 128.

public TcpBuilder Backlog(int size)

Build()

public string Build()

ClientCert(string, string?)

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

public TcpBuilder ClientCert(string path, string? password = null)

ConnectionFactory(string)

References a named from the route registry instead of putting the certificate password in the URI.

public TcpBuilder ConnectionFactory(string name)

ConnectTimeout(int)

Connection timeout in ms.

public TcpBuilder ConnectTimeout(int ms)

Delimiter(string)

Custom delimiter for text-line framing.

public TcpBuilder Delimiter(string delimiter)

Encoding(string)

Character encoding. Default utf-8.

public TcpBuilder Encoding(string encoding)

InOut(bool)

Enable request-response pattern.

public TcpBuilder InOut(bool value = true)

KeepAlive(bool)

Enable TCP keep-alive. Default true.

public TcpBuilder KeepAlive(bool value = true)

LengthPrefixed()

Use length-prefixed binary framing.

public TcpBuilder LengthPrefixed()

MaxConnections(int)

Max concurrent connections. 0 = unlimited.

public TcpBuilder MaxConnections(int max)

NoDelay(bool)

Set TCP_NODELAY. Default true.

public TcpBuilder NoDelay(bool value = true)

ReceiveBufferSize(int)

Receive buffer size in bytes.

public TcpBuilder ReceiveBufferSize(int size)

Reconnect(int, int)

Enable auto-reconnect on disconnect.

public TcpBuilder Reconnect(int intervalMs = 5000, int maxAttempts = 0)

SendBufferSize(int)

Send buffer size in bytes.

public TcpBuilder SendBufferSize(int size)

Ssl()

Enable SSL/TLS.

public TcpBuilder Ssl()

SslCertPassword(string)

SSL certificate password.

public TcpBuilder SslCertPassword(string password)

SslCertPath(string)

Path to SSL certificate.

public TcpBuilder SslCertPath(string path)

SslTargetHost(string)

Target host name for SSL validation.

public TcpBuilder SslTargetHost(string host)

TextLine()

Use newline-delimited text framing.

public TcpBuilder TextLine()

ToString()

Returns a string that represents the current object.

public override string ToString()

TrustAllCertificates()

Producer: accept any server certificate, including a self-signed one. Explicit on purpose --

public TcpBuilder TrustAllCertificates()