def wire.shake

emerging-ezhttp@0.21.0.0 · src/wire.bend:66

import emerging-ezhttp@0.21.0.0/src/wire.bend as Wire
import Base
import bend-kit-wire@0.4.6.1/wire.bend as W

66# the TLS handshake with the host, when the exchange is secure
67def wire.shake(secure: Bool, s: Socket, host: String, ms: U32)
68  -> IO(Socket & Result<&1, &1, U32 & String, Unit>):
69  match secure:
70    case True{}:
71      W.tls.connect(s, host, ms)
72    case False{}:
73      IO.pure(Socket & Result<&1, &1, U32 & String, Unit>, (s, Done{Unit{}}))

Uses (11)

Used by (1)