Description

Connection handler. This handler provides callbacks for automatically managed reconnection events. SendbirdChat tries reconnection when the connection is lost. This handler can be used to track the reconnection state. To add or remove this handler, refer to sendbirdChat.addConnectionHandler() and sendbirdChat.removeConnectionHandler().

Hierarchy

  • ConnectionHandlerParams
    • ConnectionHandler

Constructors

  • Parameters

    • params: ConnectionHandlerParams = {}

    Returns ConnectionHandler

Properties

onConnected?: ((userId) => void) = noop

Type declaration

    • (userId): void
    • A callback for when SendbirdChat is connected.

      Parameters

      • userId: string

      Returns void

onDisconnected?: ((userId) => void) = noop

Type declaration

    • (userId): void
    • A callback for when SendbirdChat is disconnected.

      Parameters

      • userId: string

      Returns void

onReconnectFailed?: (() => void) = noop

Type declaration

    • (): void
    • A callback for when reconnection is failed.

      Returns void

onReconnectStarted?: (() => void) = noop

Type declaration

    • (): void
    • A callback for when SendbirdChat tries to reconnect.

      Returns void

onReconnectSucceeded?: (() => void) = noop

Type declaration

    • (): void
    • A callback for when connection is reestablished.

      Returns void

Generated using TypeDoc