mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-13 06:10:01 -04:00
forward ws protocols
This commit is contained in:
parent
eae44fef4b
commit
ccf556118b
7 changed files with 13 additions and 10 deletions
|
@ -148,7 +148,7 @@ export class AdriftBareClient extends Client {
|
|||
|
||||
connect(
|
||||
remote: URL,
|
||||
protocols: string[],
|
||||
protocols: string | string[],
|
||||
getRequestHeaders: GetRequestHeadersCallback,
|
||||
onMeta: MetaCallback,
|
||||
onReadyState: ReadyStateCallback,
|
||||
|
@ -177,6 +177,7 @@ export class AdriftBareClient extends Client {
|
|||
|
||||
let { send, close } = this.connection.wsconnect(
|
||||
remote,
|
||||
protocols,
|
||||
() => {
|
||||
onReadyState(WebSocket.OPEN);
|
||||
ws.dispatchEvent(new Event("open"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue