basalt / realtime/src / RealtimeHubOptions
Interface: RealtimeHubOptions
Defined in: realtime/src/hub.ts:57
Properties
authorize?
> optional authorize?: (connection, channel) => boolean | Promise<boolean>
Defined in: realtime/src/hub.ts:65
Server-side subscription gate. Return false (or reject) to refuse a client's request to join channel. Set this whenever a channel carries anything not readable by every member of the tenant (a user's private channel, an admin channel): without it, any authenticated connection can subscribe to any channel name within its tenant. Default: allow all.
Parameters
connection
channel
string
Returns
boolean | Promise<boolean>
maxChannelLength?
> optional maxChannelLength?: number
Defined in: realtime/src/hub.ts:69
Max channel-name length (DoS bound). Default 256.
maxSubscriptionsPerConnection?
> optional maxSubscriptionsPerConnection?: number
Defined in: realtime/src/hub.ts:67
Max distinct channels one connection may hold (DoS bound). Default 1000.
onDeliveryError?
> optional onDeliveryError?: (error, info) => void
Defined in: realtime/src/hub.ts:76
A local delivery failed — the connection's send threw (dead/closing socket). The connection is pruned and closed, and the remaining recipients still get the message; the failure lands here. Default: console.error with context. (Same pattern as the plugin's onBridgeError.)
Parameters
error
unknown
info
channel
string
connectionId
string
event
string
tenantId
string
Returns
void