Interface: RoomRelayOptions<M>
Defined in: index.ts:113
Options for createRoomRelayBackend: the room knobs plus the delegate.
Extends
Type Parameters
M
M extends object
Properties
log?
optionallog?: (line) =>void
Defined in: index.ts:121
Line logger for lifecycle diagnostics (defaults to silent).
Parameters
line
string
Returns
void
logPrefix
logPrefix:
string
Defined in: index.ts:97
Prefixes the registration log line ("<logPrefix>: host …").
Inherited from
prefix?
optionalprefix?:string
Defined in: index.ts:115
Path prefix all routes live under (e.g. "/pencil"). Default: none.
resolveChannel?
optionalresolveChannel?:ChannelResolver
Defined in: index.ts:119
Resolve a host-announced channel port to { tag, project }.
session?
optionalsession?:object
Defined in: index.ts:117
Static session identity hosts inherit when they don't announce their own.
channelTag?
optionalchannelTag?:string
project?
optionalproject?:string
Methods
decode()
decode(
text):M|undefined
Defined in: index.ts:99
Parse a text frame, or undefined for a malformed one.
Parameters
text
string
Returns
M | undefined
Inherited from
encode()
encode(
message):string
Defined in: index.ts:101
Serialize a frame to text.
Parameters
message
M
Returns
string
Inherited from
joinedExtras()?
optionaljoinedExtras(info):Record<string,unknown>
Defined in: index.ts:105
Fields the joined frame carries beyond { host, label } (e.g. presentation).
Parameters
info
Returns
Record<string, unknown>
Inherited from
RoomRelayDelegate.joinedExtras
onClientMessage()
onClientMessage(
message,ctx):void
Defined in: index.ts:109
Route a joined client's non-join/leave frame (forward up to the host).
Parameters
message
M
ctx
Returns
void
Inherited from
RoomRelayDelegate.onClientMessage
onHostMessage()
onHostMessage(
message,ctx):void
Defined in: index.ts:107
Route a host's non-register frame (cache-and-fan-out, or client-directed).
Parameters
message
M
ctx
Returns
void
Inherited from
RoomRelayDelegate.onHostMessage
registerExtras()?
optionalregisterExtras(message):Record<string,unknown>
Defined in: index.ts:103
Fields a register frame contributes to the session (e.g. presentation, channelTag).
Parameters
message
M
Returns
Record<string, unknown>