diff --git a/local-webui/src/components/Join.vue b/local-webui/src/components/Join.vue index 389e20e..858f35d 100644 --- a/local-webui/src/components/Join.vue +++ b/local-webui/src/components/Join.vue @@ -79,7 +79,7 @@ import { clientName, registerUiWithRemote } from "../hooks/useRemote"; const REMOTE_SERVER_URL = process.env.NODE_ENV === "production" - ? "http://46.101.24.208" + ? "http://46.101.24.208:3000" : "http://127.0.0.1:3000"; export default defineComponent({ diff --git a/local/src/remote.ts b/local/src/remote.ts index 929d84a..453a7c7 100644 --- a/local/src/remote.ts +++ b/local/src/remote.ts @@ -75,7 +75,7 @@ export function getRemoteWs(url?: string): Promise { }); }); - remoteWs.on("remote/become/sender", (to: string) => { + remoteWs.on("remote/become/sender", (_to: string) => { logger.info("becoming sender"); if (isSending) { // TODO: send message to UI with details diff --git a/local/src/rxadapters/rxUdp.ts b/local/src/rxadapters/rxUdp.ts index df15b24..d3bd59d 100644 --- a/local/src/rxadapters/rxUdp.ts +++ b/local/src/rxadapters/rxUdp.ts @@ -37,7 +37,8 @@ export function observerToUdp( ): Rx.Observer<{ from: string; data: Buffer }> { return { next: ({ from, data }) => { - if (sender !== undefined || from === sender) { + logger.info(`from = ${from}, sender ${sender}`); + if (from === sender) { if (debug) logger.info( `from ${from} sending to ${address}:${port}, data ${data.byteLength}` diff --git a/remote/src/index.ts b/remote/src/index.ts index 3dc8382..8de8c11 100644 --- a/remote/src/index.ts +++ b/remote/src/index.ts @@ -134,10 +134,10 @@ io.on("connection", (socket) => { clientMap.push([fromClient, toClient]); // send message to 'from' to set up as a sender - io.to(fromClient.socketId).emit("remote/become/sender", toClient); + io.to(fromClient.socketId).emit("remote/become/sender", toClient.name); // send message to 'to' to setup as a receiver - io.to(toClient.socketId).emit("remote/become/receiver", fromClient); + io.to(toClient.socketId).emit("remote/become/receiver", fromClient.name); // send the client list and mappings to all UIs io.in("ui_room").emit("remote/state", { clients, clientMap });