@acaprojects/a2-composer
Version:
Angular 2 Interface for composer
36 lines (35 loc) • 1.32 kB
TypeScript
export declare class WebSocketInterface {
private static retries;
private counters;
private io;
private end_point;
private serv;
private req_id;
private session_id;
private uri;
private connected;
private keepAliveInterval;
private auth;
private reconnected;
private connect_check;
private connect_promise;
private requests;
private fixed;
constructor(srv: any, auth: any, fixed?: boolean, host?: string, port?: string);
setup(auth: any, host?: string, port?: string, protocol?: string): void;
bind(sys_id: string, mod_id: string, i: number, name: string, callback: () => void): Promise<any>;
unbind(sys_id: string, mod_id: string, i: number, name: string, callback: () => void): Promise<any>;
exec(sys_id: string, mod_id: string, i: number, fn: any, args: any): Promise<any>;
debug(sys_id: string, mod_id: string, i: number): any;
ignore(sys_id: string, mod_id: string, inst: any): any;
private connect(tries?);
private reconnect();
private startKeepAlive();
private stopKeepAlive();
private onopen(evt);
private onclose(evt);
private onmessage(evt);
private fail(msg, type);
private sendRequest(type, system, mod, index, name, args?);
}
export declare let $WebSocket: typeof WebSocketInterface;