mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-13 06:10:01 -04:00
forgot to save lol (add wsconnect stub to Connection)
This commit is contained in:
parent
01bf3b3002
commit
f6ad470a69
1 changed files with 14 additions and 0 deletions
|
@ -91,4 +91,18 @@ export class Connection {
|
||||||
await this.send(id, new Blob([json]), C2SRequestTypes.HTTPRequest);
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue