UNPKG

revbits-cip-integration

Version:
26 lines (25 loc) 921 B
import { CIP_OPTIONS, EVENT_CALLBACK, PLATFORM } from '../interfaces/types.type'; export declare class WebSocketClient { baseUrl: string; url: string; platform: PLATFORM; platformPrivKey: string; options: CIP_OPTIONS; cb: EVENT_CALLBACK; initialReconnectInterval: number; maxReconnectInterval: number; maxReconnectAttempts: number; private websocket; private currentReconnectAttempts; private reconnectInterval; private reconnectAttempts; constructor(baseUrl: string, url: string, platform: PLATFORM, platformPrivKey: string, options: CIP_OPTIONS, cb: EVENT_CALLBACK, initialReconnectInterval?: number, maxReconnectInterval?: number, maxReconnectAttempts?: number); private connect; private generateSocketToken; private handleOpen; private handleMessage; private handleClose; private handleError; private send; disconnect(): void; }