Class RealtimeBase

A base class used internally for Realtime APIs.

Hierarchy

Constructors

Properties

clientId: string

A client ID, used for identifying this client when publishing messages or for presence purposes. The clientId can be any non-empty string, except it cannot contain a *. This option is primarily intended to be used in situations where the library is instantiated with a key. A clientId may also be implicit in a token used to instantiate the library; an error will be raised if a clientId specified here conflicts with the clientId implicit in the token.

Callbacks: typeof RealtimeCallbacks

A callback based version of the library

Crypto: Crypto

The cryptographic functions available in the library.

Message: MessageStatic

Static utilities related to messages.

PresenceMessage: PresenceMessageStatic

Static utilities related to presence messages.

Promise: typeof RealtimePromise

A promisified version of the library (use this if you prefer to use Promises or async/await instead of callbacks)

Methods

  • Calls connection.close() and causes the connection to close, entering the closing state. Once closed, the library will not attempt to re-establish the connection without an explicit call to connect().

    Returns void

  • Calls connection.connect() and causes the connection to open, entering the connecting state. Explicitly calling connect() is unnecessary unless the autoConnect property is disabled.

    Returns void

Generated using TypeDoc