Wire.wire.after.shake: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/wire.bend as Wire Lines 174-186 of emerging-ezhttp@0.21.0.0/src/wire.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&start_line=174&end_line=186 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes import emerging-ezhttp@0.21.0.0/src/wirespec.bend as Spec # after the handshake: send, or the handshake's failure (the socket closed # plainly, as no TLS session was made) def wire.after.shake(+secure: Bool, +host: String, +port: U32, +ms: U32, +method: String, payload: Bytes.Bytes, r: Socket & Result<&1, &1, U32 & String, Unit>) -> IO(Answer): (s, res) = r match res: case Fail{(n, why)}: IO.bind(Unit, Answer, Socket.close(s), _u => IO.pure(Answer, Failed{Spec.wire.fail(Spec.Handshake{}, host, port, ms, n, why)})) case Done{_u}: wire.put(secure, s, host, port, ms, method, payload) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Socket https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Socket.close https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&name=wire.put https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wirespec.bend&name=Phase https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wirespec.bend&name=wire.fail