barracuda-client-api
Version:
API Client to connect to Barracuda Enterprise Service Bus
16 lines (9 loc) • 461 B
text/typescript
export interface IBarracudaWebSocket {
once(eventType: "message", onEvent: (msg: string) => void): void;
once(eventType: "open", onEvent: () => void): void;
once(eventType: "close", onEvent: (err: number, reason: string) => void): void;
on(eventType: "error", onEvent: (err: Error) => void): void;
on(eventType: "message", onEvent: (msg: any) => void): void;
send(msg: string): void;
close(code: number, reason: string): void;
}