@mocanvas/sync · interface

PresenceSync

interface PresenceSync

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Methods · 5

dispose(): void
getLastSent(): InstancePresence | null

The record last handed to send, for tests and debugging.

poke(force?: boolean): void

Ask for a send; collapses with any other request inside the throttle window.

force sends even when nothing about this client has changed, which is what a *re-announcement* is: somebody who was not listening when we last spoke has arrived, so the record has to go out again although it says the same thing. Without it a peer that has been sitting still since before the newcomer joined stays invisible until its next heartbeat.

start(): void
stop(): void

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.