import { ClientSession } from './client_session'; import { EventEmitter } from '../eventemitter'; import { ServerState } from '../generated/ServerState'; export interface ClientSessionKeepAliveManagerEvents { failure: () => void; keepalive: (lastKnownState: ServerState) => void; } export declare class ClientSessionKeepAliveManager extends EventEmitter { protected timerId: number; protected session: ClientSession; protected pingTimeout: number; protected lastKnownState?: ServerState; protected checkInterval: number; constructor(session: ClientSession); /** * @method ping_server * * when a session is opened on a server, the client shall send request on a regular basis otherwise the server * session object might time out. * start_ping make sure that ping_server is called on a regular basis to prevent session to timeout. * * @param callback */ ping_server(callback: () => void): void; start(): void; stop(): void; /** * Returns true when a keepalive read error indicates that the session is still alive on the * server and should NOT trigger a reconnection. * * Currently this covers `BadInvalidTimestamp`, which is a session-level rejection of the * request timestamp rather than a sign that the session (or transport) is gone. */ static isSessionStillAlive(err: Error): boolean; } //# sourceMappingURL=client_session_keepalive_manager.d.ts.map