import Stream from '../Stream'; import IDSource from '../utils/IDSource'; import GraphLike from '../GraphLike'; export declare type RespondFunc = (msg: string) => void; interface PendingQuery { query: string; output: Stream; } export default class ClientConnection implements GraphLike { url: string; ws: WebSocket; requestId: IDSource; connectionId: string; autoReconnect: boolean; pendingForConnection: PendingQuery[]; reqListeners: { [id: string]: Stream; }; connectAttemptInProgress: boolean; maxReconnectAttempts: number; shouldLogReconnect: boolean; constructor(url: string); openSocket(): Promise; start(): Promise; setupWebsocket(): void; close(): Promise; run(commandStr: string, output?: Stream): void; runSync(commandStr: string): any; } export declare function connectToServer(port: string | number): Promise; export {};