-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_websocket.deno.txt
21 lines (15 loc) · 1.76 KB
/
deno_websocket.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
DENO_WEBSOCKET
VERSION ==> #See deno doc
WebSocket N#Like DOM
WebSocketStream N!#Like DOM
Deno.upgradeWebSocket #Does WebSocket upgrade handshake response
(REQ[, OPTS])->OBJ #Should only do it if Upgrade: websocket [C] was used
#OBJ:
# - response RES: to send back to client
# - socket WEBSOCKET
#HTTP 1.1 only
OPTS.protocol #'SUBPROTOCOL' of Sec-WebSocket-Protocol [S]
OPTS.idleTimeout #NUM (in secs, def: 120, can be 0)
#Client must answer within NUMs with a ping, otherwise close|error events emitted