UNPKG

@macrix/pct-cmd

Version:

Package provide communication layer to ProconTel web infrastructure

21 lines (20 loc) 1.02 kB
import { HubConnectionState, IHttpConnectionOptions, IStreamResult } from '@microsoft/signalr'; import { IEndpointConnection } from './'; export declare class EndpointConnection implements IEndpointConnection { private readonly connection; private connectedCallbacks; constructor(url: string, options?: IHttpConnectionOptions); get state(): HubConnectionState; start(): Promise<void>; private startInternal; stop(): Promise<void>; on(commandId: string, newMethod: (...args: any[]) => void): Promise<any>; off(commandId: string): Promise<any>; get<T = any>(commandId: string, arg: any): Promise<T>; post(commandId: string, arg: any): Promise<void>; onclose(callback: (error?: Error) => void): void; onreconnecting(callback: (error?: Error) => void): void; onreconnected(callback: (connectionId?: string) => void): void; onconnected(callback: (connectionId?: string) => void): void; stream<T = any>(methodName: string, ...args: any[]): IStreamResult<T>; }