]>
git.r.bdr.sh - rbdr/forum/blob - app/socket_coordinator.js
1 import { socketServer
} from './config/config';
5 socket: null, // stores the socket connection
9 internals
.socket
= new WebSocket(socketServer
);
13 export const onMessage = function (listener
) {
15 if (!internals
.socket
) {
19 internals
.socket
.addEventListener('message', (message
) => {
21 listener(JSON
.parse(message
.data
));