Options
All
  • Public
  • Public/Protected
  • All
Menu

The connection module is responsible for creating a persistent connection between the SDK and the chat server. This module involves all APIs for login, contacts, groups, and chat rooms.

Index

Type Aliases

ConnectionParameters: { apiUrl?: string; appId?: string; appKey?: string; autoReconnectNumMax?: number; customDeviceName?: string; customOSPlatform?: number; delivery?: boolean; deviceId?: string; heartBeatWait?: number; https?: boolean; isDebug?: boolean; isFixedDeviceId?: boolean; isHttpDNS?: boolean; uikitVersion?: string; url?: string; useOwnUploadFun?: boolean; useReplacedMessageContents?: boolean }

Type declaration

  • Optional apiUrl?: string

    The URL of the specified REST server. This 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.

  • Optional appId?: string

    The unique application id registered on the console.

  • Optional appKey?: string

    The unique application key registered on the console.

  • Optional autoReconnectNumMax?: number

    The maximum number of reconnection attempts allowed.

  • Optional customDeviceName?: string

    Customize device name. The device name can only be set through this parameter after configuring customOSPlatform.

  • Optional customOSPlatform?: number

    Custom platform, optional values [1-100]. Please refer to the multi device login document for details.

  • Optional delivery?: boolean

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

  • Optional deviceId?: string

    The unique web device ID. By default, it is a random number.

  • Optional heartBeatWait?: number

    The heartbeat interval (in millisecond). The default value is 30,000ms.

  • Optional https?: boolean

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

  • Optional isDebug?: boolean

    Whether to start logging. - true: Yes; - (Default)false: No.

  • Optional isFixedDeviceId?: boolean

    Whether to use a fixed device ID (deviceId).
    - (Default) true: The SDK generates a device ID for a browser and saves it to the local storage. Then in the browser, all SDK instances use the same device.
    -false: A random device ID is used for connections of each SDK instance. That is to say, each SDK instance uses a different device for connections.
    This parameter has an impact on the kicking policy during a multi-device login scenario.

  • Optional isHttpDNS?: boolean

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

  • Optional uikitVersion?: string
  • Optional 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.

  • Optional useOwnUploadFun?: boolean

    Whether to use your own upload function, for example, when uploading images and files to your server. - true: Yes. Use your own upload function; - (Default)false: No. Upload images and files to the message server.

  • Optional useReplacedMessageContents?: boolean

    When the moderation service replaces the content of a message, whether the adjusted message is returned to the sender. - true: Return the adjusted message to the sender. - false: Return the original message to the sender.

Generated using TypeDoc