def conn.h2.sent

bend-kit-http@0.38.2.0 · http.bend:2781

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-wire@0.4.7.0/wire.bend as Wire
import bend-kit-http2@0.4.0.0/http2.bend as H2

2781def conn.h2.sent(client: H2.Client, r: Socket & Result<&1, &1, U32 & String, Unit>) -> IO(Result<&1, &1, Err, Conn>):
2782  (s, sent) = r
2783  match sent:
2784    case Fail{(+code, why)}:
2785      do IO<Result<&1, &1, Err, Conn>>:
2786        Wire.tls.close(s)
2787        return Fail{err.or_late(code, ErrWrite{code, why})}
2788    case Done{u}:
2789      IO.pure(Result<&1, &1, Err, Conn>, Done{ConnH2{s, client}})

Uses (15)

Used by (1)