@mocanvas/sync · class
declare class PresenceRoom<R extends UnknownRecord>Holds the presence records of everyone else: puts them in the store as they
arrive, drops them on bye, and sweeps clients that went quiet.
Methods · 7
clear(): voidRemove every record this room put in the store.
constructor(store: Store<R, any>, timeoutMs?: number)receive(clientId: string, record: R): voidStore an incoming presence record and remember when we saw its client.
remove(clientId: string): voidDrop one client's presence (it said goodbye).
startSweeping(intervalMs?: number): voidstopSweeping(): voidsweep(now?: number): voidDrop every client we have not heard from within the timeout.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.