ARMessage is a helper class to send and receive messages between Client App and Map Webview

Constructors

Properties

authSocket: ((recipients?) => void) = authSocket

Type declaration

    • (recipients?): void
    • Identify the current Author (User/Application) on the current websocket

      Parameters

      • recipients: string[] = []

        recipients which should receive a notification this author has logged in

      Returns void

createSocket: ((server) => undefined | WebSocket) = createSocket

Type declaration

    • (server): undefined | WebSocket
    • Create a new websocket client to the given server

      Parameters

      • server: string

      Returns undefined | WebSocket

      the new websocket client

destroySocket: (() => void) = destroySocket

Type declaration

    • (): void
    • Destroy the current websocket client

      Returns void

getAuthor: (() => string) = getARMessageAuthor

Type declaration

    • (): string
    • Returns string

getDefaultRecipients: (() => string[]) = getDefaultRecipients

Type declaration

    • (): string[]
    • Get the current default recipients for ARMessage.send

      Returns string[]

      the current default recipients for ARMessage.send

getDefaultTarget: (() => ARMessageTarget) = getDefaultTarget

Type declaration

    • (): ARMessageTarget
    • Get the current default target for ARMessage.send

      Returns ARMessageTarget

      the current default target for ARMessage.send

getSocket: (() => null | WebSocket) = getSocket

Type declaration

    • (): null | WebSocket
    • Get the current websocket client

      Returns null | WebSocket

      the current websocket client

on: ((eventType, handler) => undefined | ARMessageHandlerCleanup) = onARMessage

Type declaration

send: ((message, options?) => ARMessageEvent) = sendARMessage

Type declaration

setAuthor: ((author) => void) = setARMessageAuthor

Type declaration

    • (author): void
    • Assume a new Author name (User/Application) on the current websocket

      Parameters

      • author: string

        the new author name

      Returns void

setDefaultRecipients: ((recipients) => void) = setDefaultRecipients

Type declaration

    • (recipients): void
    • Set the new default recipients for ARMessage.send

      Parameters

      • recipients: string[]

        the new default recipients for ARMessage.send

      Returns void

setDefaultTarget: ((targets) => ARMessageTarget) = setDefaultARMessageTarget

Type declaration

    • (targets): ARMessageTarget
    • Set the new default targets for ARMessage.send

      Parameters

      • targets: ARMessageTarget

        the new default targets for ARMessage.send

      Returns ARMessageTarget

Generated using TypeDoc