From 8d8e9de3d27b08449d32d54b44babe3467fd3b46 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 12 Aug 2019 19:04:30 +0530 Subject: [PATCH 1/2] socket.io --- src/app/shared/services/chart.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/services/chart.service.ts b/src/app/shared/services/chart.service.ts index a0325dd..41b9a98 100644 --- a/src/app/shared/services/chart.service.ts +++ b/src/app/shared/services/chart.service.ts @@ -17,7 +17,7 @@ export class ChartService { private socket; constructor(public http: HttpClient) { - this.socket = io.connect(this.server); + this.socket = io.connect(this.server, {transports: ['websocket']}); } // public createSocketConnection() { From 18b9a275078bf567d3148e520a2b0effbc982dce Mon Sep 17 00:00:00 2001 From: root Date: Mon, 12 Aug 2019 19:24:40 +0530 Subject: [PATCH 2/2] socket.io --- server.ts | 6 +++--- src/app/shared/services/chart.service.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server.ts b/server.ts index 4c8cff4..4010b60 100644 --- a/server.ts +++ b/server.ts @@ -149,9 +149,9 @@ connection }); const io = require("socket.io").listen(server); io.sockets.on("connection", socket => { - setInterval(function() { - universalGetLatestBlockDetails(socket); - },1000); + // setInterval(function() { + // //universalGetLatestBlockDetails(socket); + // },1000); }); }) .catch(error => { diff --git a/src/app/shared/services/chart.service.ts b/src/app/shared/services/chart.service.ts index 41b9a98..a0325dd 100644 --- a/src/app/shared/services/chart.service.ts +++ b/src/app/shared/services/chart.service.ts @@ -17,7 +17,7 @@ export class ChartService { private socket; constructor(public http: HttpClient) { - this.socket = io.connect(this.server, {transports: ['websocket']}); + this.socket = io.connect(this.server); } // public createSocketConnection() {