def conn.tls

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

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

2771def conn.tls(m: Socket & Result<&1, &1, U32 & String, Unit>) -> IO(Result<&1, &1, Err, Conn>):
2772  (s, r) = m
2773  match r:
2774    case Fail{(+code, why)}:
2775      do IO<Result<&1, &1, Err, Conn>>:
2776        Wire.tls.close(s)
2777        return Fail{err.or_late(code, ErrTls{code, why})}
2778    case Done{u}:
2779      IO.pure(Result<&1, &1, Err, Conn>, Done{Conn{True{}, s}})

Uses (15)

Used by (3)