Skip to content

ServerWebSocketActorOptions

Defined in: src/io/broker/ServerWebSocketActor.ts:61

readonly optional onError?: (err) => void

Defined in: src/io/broker/ServerWebSocketActor.ts:76

Optional callback fired when the socket emits an error. Useful for backend-specific telemetry; the actor still proceeds to stop unless you turn stopOnSocketClose off.

Error

void


readonly optional stopOnSocketClose?: boolean

Defined in: src/io/broker/ServerWebSocketActor.ts:70

Stop the actor when the socket closes. Default true — the usual case where the actor exists solely to bridge one connection. Flip to false to handle close yourself (e.g. when an outer supervisor wants to react before teardown).


readonly optional target?: ActorRef<WebSocketFrame>

Defined in: src/io/broker/ServerWebSocketActor.ts:63

Subscriber that receives every inbound text/binary frame.