Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WebSocketNetworkEventsRecord

Events record for WebSocketNetwork.

Hierarchy

  • WebSocketNetworkEventsRecord

Index

Properties

Connect: {}

Emitted when we connect to the server.

Type declaration

    Disconnect: { cause: "close" | "error" | "manual"; wsEvent: null | CloseEvent | Event }

    Emitted when we disconnect from the server.

    This is also emitted if we fail to connect to the server.

    Type declaration

    • cause: "close" | "error" | "manual"

      The reason for the disconnection:

    • wsEvent: null | CloseEvent | Event

      The WebSocket event, if cause is "close" or "error" (else null).

    Load: { doc: AbstractDoc | CRuntime; docID: string }

    Emitted after doc loads the server's current state.

    This may be emitted multiple times for a doc - in particular, after reconnecting.

    Type declaration

    • doc: AbstractDoc | CRuntime
    • docID: string
    Save: { doc: AbstractDoc | CRuntime; docID: string }

    Emitted after all of doc's local changes are confirmed saved to the server.

    Type declaration

    • doc: AbstractDoc | CRuntime
    • docID: string
    SubscribeDenied: { doc: AbstractDoc | CRuntime; docID: string }

    Emitted if we subscribe to a docID but the server denies us access.

    Type declaration

    • doc: AbstractDoc | CRuntime
    • docID: string

    Generated using TypeDoc