Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Connection

Index

Constructors

Properties

apiUrl: string

The URL of the specified REST server. The URL is used when DNS is not enabled. Usually, this URL is used by specific customers who expects to implement data isolation for strict data security. To get the URL, contact our account manager.

appKey: string

Your App Key.

autoReconnectNumMax: number

The maximum number of reconnection attempts allowed. The default value is 5.

dataReport: DataReport
delivery: boolean

Whether to enable the receipt of delivery. - true: Enable; - (Default)false: Disable.

deviceId: string

The device ID.

eventHandler?: EventHandler
heartBeatWait: number

The heartbeat interval (in millisecond). By default, it is 30000 ms.

https: boolean

Whether to use HTTPS only. By default, the browser determines whether to use HTTPS only according to the domain name.

isDebug: boolean
isHttpDNS: boolean

Whether to enable DNS. - (Default)true: Enable; - false: Disable.

name: string = 'connection'
token: string

The user token for login.

url: string

The URL of the specified message server. Usually, this URL is used by specific customers who expects to implement data isolation for strict data security. To get the URL, contact our account manager.

useOwnUploadFun: boolean

Whether to use your own upload function, for example, when uploading images and files to your own server.

version: string

The SDK version.

Methods

  • Registers the listener function.

    Parameters

    Returns void

  • close(): void
  • Closes the connection.

    Returns void

  • isOpened(): boolean
  • Checks the connection status. - true: Connected; - (Default)false: Disconnected.

    Returns boolean

  • removeEventHandler(id: string): void
  • Removes the listener function.

    Parameters

    • id: string

    Returns void

  • Updates the token.

    Parameters

    • agoraToken: string

    Returns Promise<NewTokenResult>

Generated using TypeDoc