UNPKG

helene

Version:
25 lines (24 loc) 702 B
import { EventEmitter2 } from 'eventemitter2'; import { Socket } from 'socket.io-client'; import { Client, WebSocketOptions } from './client'; export declare class ClientSocket extends EventEmitter2 { client: Client; socket: Socket; protocol: string; uri: string; stopped: boolean; connecting: boolean; options: WebSocketOptions; baseAttemptDelay: number; get ready(): boolean; constructor(client: Client, options?: WebSocketOptions); connect(): void; close(): Promise<void>; send(payload: string): void; sendSetup(): void; handleOpen(): void; handleMessage(data: { data: string; }): Promise<void>; private handleError; }