def wire.after.send

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

import emerging-ezhttp@0.21.0.0/src/wire.bend as Wire
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

153# after the send: read the answer, or the send's failure
154def wire.after.send(+secure: Bool, +host: String, +port: U32, +ms: U32,
155  +method: String, r: Socket & Result<&1, &1, U32 & String, Unit>)
156  -> IO(Answer):
157  (s, res) = r
158  match res:
159    case Fail{(n, why)}:
160      wire.failed(secure, s,
161        Spec.wire.fail(Spec.Send{}, host, port, ms, n, why))
162    case Done{_u}:
163      wire.loop(wire.reads(), secure, s, host, port, ms, Spec.wire.got(method),
164        Bytes.new(0))

Uses (17)

Used by (1)