@brainstack/bridge-server
Advanced tools
Comparing version 2.0.44 to 2.0.45
@@ -18,6 +18,5 @@ "use strict"; | ||
this.socketToUUID = new Map(); | ||
this.wss = new ws_1.default.Server({ port: this.port, host: this.host }); | ||
this.wss = null; | ||
this.hub = hub; | ||
hub.on(/^(macro|meso)\.dts\.rawdata\.outgoing$/, this.broadcastToClients.bind(this)); | ||
this.start(); | ||
} | ||
@@ -40,2 +39,3 @@ broadcastToClients(rawData) { | ||
setupListeners() { | ||
this.wss = new ws_1.default.Server({ port: this.port, host: this.host }); | ||
this.wss.on('connection', (ws) => { | ||
@@ -42,0 +42,0 @@ const uuid = this.generateUUID(); |
{ | ||
"name": "@brainstack/bridge-server", | ||
"version": "2.0.44", | ||
"version": "2.0.45", | ||
"description": "Brainstack Bridge Server", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -23,7 +23,5 @@ import { EventHub } from '@brainstack/hub'; | ||
this.socketToUUID = new Map(); | ||
this.wss = new WebSocket.Server({ port: this.port, host: this.host }); | ||
this.wss = null; | ||
this.hub = hub; | ||
hub.on( /^(macro|meso)\.dts\.rawdata\.outgoing$/, this.broadcastToClients.bind(this)); | ||
this.start(); | ||
} | ||
@@ -49,2 +47,4 @@ | ||
private setupListeners(): void { | ||
this.wss = new WebSocket.Server({ port: this.port, host: this.host }); | ||
this.wss.on('connection', (ws: WebSocket) => { | ||
@@ -51,0 +51,0 @@ const uuid = this.generateUUID(); |
151048