kuzzle-sdk
Version:
Official Javascript SDK for Kuzzle
34 lines (33 loc) • 1.16 kB
TypeScript
import { KuzzleAbstractProtocol } from "./Base";
import { DisconnectionOrigin } from "../DisconnectionOrigin";
import { KuzzleError } from "../../KuzzleError";
export declare abstract class BaseProtocolRealtime extends KuzzleAbstractProtocol {
protected _reconnectionDelay: number;
protected wasConnected: boolean;
protected stopRetryingToConnect: boolean;
protected retrying: boolean;
autoReconnect: boolean;
constructor(host: any, options: any, name: string);
/**
* Number of milliseconds between reconnection attempts
*/
get reconnectionDelay(): number;
connect(): Promise<any>;
/**
* Called when the client's connection is established
*/
clientConnected(): void;
/**
* Called when the client's connection is closed
*
* @param {string} origin String that describe what is causing the disconnection
*/
clientDisconnected(origin: DisconnectionOrigin): void;
/**
* Called when the client's connection is closed with an error state
*
* @param {KuzzleError} error
*/
clientNetworkError(error: KuzzleError): void;
isReady(): boolean;
}