TLSocketRoomOptions
See source codeTable of contents
Base options for TLSocketRoom.
interface TLSocketRoomOptions<R extends UnknownRecord, SessionMeta> {}Properties
clientTimeout
optional
clientTimeout?: numberinitialSnapshot
optional
Deprecated: use the storage option instead
initialSnapshot?: RoomSnapshot | TLStoreSnapshotlog
optional
log?: TLSyncLogonAfterReceiveMessage
optional
onAfterReceiveMessage?: (args: {
message: TLSocketServerSentEvent<R>
meta: SessionMeta
sessionId: string
stringified: string
}) => voidonBeforeSendMessage
optional
onBeforeSendMessage?: (args: {
message: TLSocketServerSentEvent<R>
meta: SessionMeta
sessionId: string
stringified: string
}) => voidonSessionRemoved
optional
onSessionRemoved?: (
room: TLSocketRoom<R, SessionMeta>,
args: {
meta: SessionMeta
numSessionsRemaining: number
sessionId: string
}
) => voidschema
optional
schema?: StoreSchema<R, any>storage
optional
storage?: TLSyncStorage<R>Methods
onDataChange
optional
Deprecated: use the storage option with an onChange callback instead
Prev
TLPersistentClientSocketNext
TLSyncForwardDiff