diff --git a/lib/WetSock/WetSock.js b/lib/WetSock/WetSock.js index feae80a..451d467 100644 --- a/lib/WetSock/WetSock.js +++ b/lib/WetSock/WetSock.js @@ -4,8 +4,8 @@ export default class WetSock { #clients = new Map(); #plugins = new Map(); constructor(config) { - this.config = config; - this.server = null; + this.#config = config; + this.#server = null; } start(server) { @@ -36,7 +36,6 @@ export default class WetSock { if(plugin.onMessage(ws.data.clientId, message)) break; // plugin consumes message by returning a truthy value } } - handleOpen(ws) { const client = this.#clients.get(ws.data.clientId); this.#plugins.forEach((plugin) => plugin.onOpen(ws.data.clientId)); diff --git a/lib/index.js b/lib/index.js index 16c97d6..d5d8b4b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,8 @@ -import WetSock from './WetSock'; import { resolve } from 'path'; +import WetSock from './WetSock'; + + const wetsock = new WetSock(); const server = Bun.serve({