def h2.send.report
bend-kit-http@0.38.4.0 · http.bend:3270
import bend-kit-http@0.38.4.0/http.bend as Http
import Base
import bend-kit-wire@0.4.8.0/wire.bend as Wire
3270def h2.send.report(r: Socket & Result<&1, &1, U32 & String, Unit>) ->
3271 IO(Result<&1, &1, Err, Socket>):
3272 (s, sent) = r
3273 match sent:
3274 case Fail{(+code, why)}:
3275 do IO<Result<&1, &1, Err, Socket>>:
3276 Wire.tls.close(s)
3277 return Fail{err.or_late(code, ErrWrite{code, why})}
3278 case Done{unit}:
3279 IO.pure(Result<&1, &1, Err, Socket>, Done{s})