@yorkie-js/sdk
    Preparing search index...

    Interface AttachChannelOptions

    AttachChannelOptions are user-settable options used when attaching channels.

    interface AttachChannelOptions {
        channelHeartbeatInterval?: number;
        syncMode?: SyncMode;
    }
    Index

    Properties

    channelHeartbeatInterval?: number

    channelHeartbeatInterval overrides the heartbeat interval (ms) for this attachment. If unset, mode-specific defaults apply: Polling=3000, Realtime=30000.

    syncMode?: SyncMode

    syncMode selects how the channel keeps presence in sync with the server. Default is SyncMode.Realtime.

    • SyncMode.Realtime: open a watch stream and run the heartbeat. Required to receive broadcast events.
    • SyncMode.Polling: heartbeat-only. No watch stream is opened. The heartbeat refreshes TTL and brings the latest sessionCount. Recommended for large channels where broadcast is not needed.
    • SyncMode.Manual: no automatic activity. Caller must invoke sync().