summaryrefslogtreecommitdiff
path: root/ws
diff options
context:
space:
mode:
Diffstat (limited to 'ws')
-rw-r--r--ws/example_client.ts3
-rw-r--r--ws/mod.ts5
2 files changed, 6 insertions, 2 deletions
diff --git a/ws/example_client.ts b/ws/example_client.ts
index c2be9d76e..cdb482410 100644
--- a/ws/example_client.ts
+++ b/ws/example_client.ts
@@ -42,7 +42,8 @@ async function main(): Promise<void> {
} else {
await sock.send(line);
}
- // FIXME: Without this, sock.receive() won't resolved though it is readable...
+ // FIXME: Without this,
+ // sock.receive() won't resolved though it is readable...
await new Promise((resolve): void => setTimeout(resolve, 0));
}
await sock.close(1000);
diff --git a/ws/mod.ts b/ws/mod.ts
index d74e4a92b..946eb4bf4 100644
--- a/ws/mod.ts
+++ b/ws/mod.ts
@@ -474,7 +474,10 @@ async function handshake(
}
}
-/** Connect to given websocket endpoint url. Endpoint must be acceptable for URL */
+/**
+ * Connect to given websocket endpoint url.
+ * Endpoint must be acceptable for URL.
+ */
export async function connectWebSocket(
endpoint: string,
headers: Headers = new Headers()