def proxy.connect.sent
bend-kit-http@0.38.2.0 · http.bend:3475
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
3475def proxy.connect.sent(r: Socket & Result<&1, &1, U32 & String, Unit>,
3476 +ms: U32, sni: String, cert: Maybe<&2, Cert>, +ca: String) ->
3477 IO(Result<&1, &1, Err, Conn>):
3478 (s, sent) = r
3479 match sent:
3480 case Fail{(+code, why)}:
3481 proxy.connect.fail(s, err.or_late(code, ErrWrite{code, why}))
3482 case Done{unit}:
3483 proxy.connect.loop(Nat.mul(3n, 65536n), TunnelRead{s, ""}, ms, sni, cert, ca)