From b6b647dc21beb37bc3436279a1427361b4bc581d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 10 Apr 2018 14:24:57 +0200 Subject: [PATCH] Expose JSON sending method in weboscketservice --- src/app/services/websocket.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/services/websocket.service.ts b/src/app/services/websocket.service.ts index e4a5fed..618a159 100644 --- a/src/app/services/websocket.service.ts +++ b/src/app/services/websocket.service.ts @@ -44,6 +44,10 @@ export class WebSocketService { const message = {'key': key}; if (data) { message['data'] = data; } if (trigger) { message['trigger'] = trigger; } - this.uplink.next(message); + this.sendJSON(message); + } + + public sendJSON(json: any) { + this.uplink.next(json); } }