make network abstraction pass bare buffer

this bitrots tcp a bit. once the tcp protocol is replaced with a message based one it shouild be fine
This commit is contained in:
modeco80
2024-08-22 04:20:26 -04:00
parent 53b5b6d874
commit f7fb30ba20
7 changed files with 26 additions and 16 deletions

View File

@@ -173,9 +173,7 @@ export default class CollabVMServer implements IProtocolHandlers {
}
}
// TODO: we should probably just make this a buffer arg lol..
user.socket.on('msg', (msg: string) => {
let buf = Buffer.from(msg);
user.socket.on('msg', (buf: Buffer, binary: boolean) => {
try {
user.protocol.processMessage(buf);
} catch (err) {