forward ws protocols

This commit is contained in:
Spencer Pogorzelski 2023-08-14 21:20:47 -07:00
parent eae44fef4b
commit ccf556118b
7 changed files with 13 additions and 10 deletions

View file

@ -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"));