def stream.sent
bend-kit-http@0.38.4.0 · http.bend:4946
import bend-kit-http@0.38.4.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
4946def stream.sent(+tls: Bool, +ms: U32, +head: Bool, back: Maybe<&2, String>, m: Socket & Result<&1, &1, U32 & String, Unit>) -> IO(Bool & Result<&1, &1, Err, Stream>):
4947 (s, r) = m
4948 match r:
4949 case Fail{(+code, why)}:
4950 do IO<Bool & Result<&1, &1, Err, Stream>>:
4951 io.close(tls, s)
4952 return (True{}, Fail{err.or_late(code, ErrWrite{code, why})})
4953 case Done{u}:
4954 stream.head(tls, ms, head, back, (s, ShMore{Bytes.new(0), 0}))