跳转到内容
简体中文

UdpSocketOptionsBuilder

此内容尚不支持你的语言。

Defined in: src/io/broker/UdpSocketOptions.ts:25

new UdpSocketOptionsBuilder(): UdpSocketOptionsBuilder

UdpSocketOptionsBuilder

BrokerOptionsBuilder<UdpSocketOptionsType>.constructor

build(): Partial<T>

Defined in: src/util/OptionsBuilder.ts:51

Snapshot the set fields as an independent Partial<T> (own props only).

Partial<T>

BrokerOptionsBuilder.build


withBindHost(host): this

Defined in: src/io/broker/UdpSocketOptions.ts:32

Local bind address. Default '0.0.0.0'.

string

this


withBindPort(port): this

Defined in: src/io/broker/UdpSocketOptions.ts:37

Local port. 0 (default) lets the OS pick.

number

this


withCircuitBreaker(failureThreshold, resetMs): this

Defined in: src/io/broker/BrokerOptions.ts:125

Circuit breaker around connect attempts.

number

number

this

BrokerOptionsBuilder.withCircuitBreaker


withOutboundBuffer(limit): this

Defined in: src/io/broker/BrokerOptions.ts:130

Outbound buffer size (messages held while disconnected). Default 1000; 0 = fail-fast.

number

this

BrokerOptionsBuilder.withOutboundBuffer


withReconnect(policy): this

Defined in: src/io/broker/BrokerOptions.ts:120

Reconnect policy (or false to disable auto-reconnect).

false | { factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; } | undefined

false


{ factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }

number

number

number

Cap on retry attempts. Default: Infinity (retry forever).

number


undefined

this

BrokerOptionsBuilder.withReconnect


withTarget(target): this

Defined in: src/io/broker/UdpSocketOptions.ts:47

Subscriber for inbound datagrams. Required.

ActorRef<UdpDatagram>

this


withType(type): this

Defined in: src/io/broker/UdpSocketOptions.ts:42

IPv4 ('udp4', default) or IPv6 ('udp6').

"udp4" | "udp6"

this


static create(): UdpSocketOptionsBuilder

Defined in: src/io/broker/UdpSocketOptions.ts:27

Start a fresh builder. Equivalent to new UdpSocketOptionsBuilder().

UdpSocketOptionsBuilder