forgot to save lol (add wsconnect stub to Connection)

This commit is contained in:
CoolElectronics 2023-08-13 20:03:05 -04:00
parent 01bf3b3002
commit f6ad470a69
No known key found for this signature in database
GPG key ID: F63593D168636C50

View file

@ -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
};
}
}