def handshake

bend-kit-websocket@0.4.0.0 · websocket.bend:897

import bend-kit-websocket@0.4.0.0/websocket.bend as Websocket
import Base

897# The opening handshake on a connected socket (TLS already up when tls). host is the Host
898# header and path the request target. max caps frame and message sizes. On failure the
899# socket is closed. Bytes the server sent after its head stay in the Conn.
900def handshake(sock: Socket, +tls: Bool, +host: String, +path: String, +max: U32, +ms: U32) -> IO(Result<&1, &1, U32 & String, Conn>):
901  do IO<Result<&1, &1, U32 & String, Conn>>:
902    k : Result<&1, &1, U32 & String, String> <- key()
903    hs.keyed(k, sock, tls, host, path, max, ms)

Uses (11)

Used by (2)