chore cleanup
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import WetSock from './WetSock';
|
||||
import { resolve } from 'path';
|
||||
|
||||
import WetSock from './WetSock';
|
||||
|
||||
|
||||
const wetsock = new WetSock();
|
||||
|
||||
const server = Bun.serve({
|
||||
|
||||
Reference in New Issue
Block a user