UNPKG

webstomp-obs

Version:

Stomp over websocket using observable

15 lines (14 loc) 577 B
import 'rxjs/add/operator/first'; import 'rxjs/add/observable/from'; export declare class Chat { private wsClient; private sourceConnection; private topic; constructor(url: string, login: string, password: string, topic: string); private connect; onConnect: (onConnect: Function, onError?: Function) => void; onMessage: (onMessageFn: Function, onError?: Function) => void; onError: (onErrorMsgFn: Function) => void; onConnectionError: (onConnectionErrorMsgFn: Function) => void; sendBroadcast: (message: string) => void; }