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

    Class Channel

    Channel represents a lightweight channel for presence and messaging.

    Implements

    Index

    Constructors

    Methods

    • broadcast sends a message to all clients watching this channel.

      Parameters

      • topic: string
      • payload: any
      • Optionaloptions: BroadcastOptions

      Returns void

    • hasLocalChanges returns whether this channel has local changes or not. Channel is server-managed, so it always returns false.

      Returns boolean

    • setActor sets the actor ID into this channel.

      Parameters

      • actorID: string

      Returns void

    • updateSessionCount updates the session count and sequence number if the sequence is newer. Returns true if the count was updated, false if the update was ignored.

      Parameters

      • sessionCount: number
      • seq: number

      Returns boolean