def wire.shake
import emerging-ezhttp@0.21.0.0/src/wire.bend as Wireimport 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{}}))