From f6ad470a69f6e85fb2a62800b8119f472bc863b5 Mon Sep 17 00:00:00 2001 From: CoolElectronics Date: Sun, 13 Aug 2023 20:03:05 -0400 Subject: [PATCH] forgot to save lol (add wsconnect stub to Connection) --- client/src/Connection.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/client/src/Connection.ts b/client/src/Connection.ts index 8da7d77..d268df7 100644 --- a/client/src/Connection.ts +++ b/client/src/Connection.ts @@ -91,4 +91,18 @@ export class Connection { await this.send(id, new Blob([json]), C2SRequestTypes.HTTPRequest); }); } + // idk the type of data, figure it out ig + wsconnect(url: URL, onopen: () => void, onclose: () => void, onmessage: (data: any) => void): (data: any) => void { + + // do the connection shit here + + onopen(); + // this can't be async, just call onopen when opened + + return (data) => { + + // send "data" to the server + }; + + } }