summaryrefslogtreecommitdiff
path: root/std/ws
diff options
context:
space:
mode:
Diffstat (limited to 'std/ws')
-rw-r--r--std/ws/README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/std/ws/README.md b/std/ws/README.md
index 54efc57cc..329116a22 100644
--- a/std/ws/README.md
+++ b/std/ws/README.md
@@ -21,18 +21,18 @@ async function handleWs(sock: WebSocket) {
try {
for await (const ev of sock) {
if (typeof ev === "string") {
- // text message
+ // text message.
console.log("ws:Text", ev);
await sock.send(ev);
} else if (ev instanceof Uint8Array) {
- // binary message
+ // binary message.
console.log("ws:Binary", ev);
} else if (isWebSocketPingEvent(ev)) {
const [, body] = ev;
- // ping
+ // ping.
console.log("ws:Ping", body);
} else if (isWebSocketCloseEvent(ev)) {
- // close
+ // close.
const { code, reason } = ev;
console.log("ws:Close", code, reason);
}
@@ -99,7 +99,7 @@ Create mask from the client to the server with random 32bit number.
### acceptable
-Returns true if input headers are usable for WebSocket, otherwise false
+Returns true if input headers are usable for WebSocket, otherwise false.
### createSecAccept