Options
All
  • Public
  • Public/Protected
  • All
Menu

Module components/websocketContext

Index

Type aliases

connectionState

connectionState: "NONE" | "CONNECTING" | "OPEN" | "CLOSING" | "CLOSED" | "ERROR"

The various states the websocket can be in.

websocketArgs

websocketArgs: object

Type containing all the arguments needed to create a context with a websocket.

Type declaration

  • addListener: function
      • (id: string, callback: function): number
      • Parameters

        • id: string
        • callback: function
            • (boxes: Box[], frameId: number): void
            • Parameters

              • boxes: Box[]
              • frameId: number

              Returns void

        Returns number

  • connectionState: connectionState
  • objects: NewObjectClientMessage[]
  • removeListener: function
      • (listener: number): void
      • Parameters

        • listener: number

        Returns void

  • send: function
  • setSocket: function
      • (url: string): void
      • Parameters

        • url: string

        Returns void

Variables

Const websocketContext

websocketContext: Context<websocketArgs> = ...

The context which can be used by other components to send/receive messages.

Functions

WebsocketProvider

  • WebsocketProvider(props: WebsocketProviderProps): Element
  • Context provider for a websocket connection with the processor orchestrator.

    Parameters

    • props: WebsocketProviderProps

      Properties containing children.

    Returns Element

    The children wrapped with a websocket context provider.

Made by Horyus. Documentation generated by TypeDoc.