Cohttp_lwt_unix.NetSourceBasic satisfaction of Cohttp_lwt.Net
default_ctx is the default network context. It uses Conduit_lwt_unix.default_ctx and Resolver_lwt_unix.system.
init ?ctx ?resolver () is a network context that is the same as the default_ctx, but with either the connection handling or resolution module overridden with ctx or resolver respectively. This is useful to supply a Conduit_lwt_unix.resolver with a custom source network interface, or a Resolver_lwt.t with a different name resolution strategy (for instance to override a hostname to point it to a Unix domain socket).
val connect_uri :
ctx:ctx ->
Uri.t ->
(Conduit_lwt_unix.flow
* Lwt_io.input Lwt_io.channel
* Lwt_io.output Lwt_io.channel)
Lwt.tconnect_uri ~ctx uri starts a flow on the given uri. The choice of the protocol (with or without encryption) is done by the scheme of the given uri:
https, we will extend ctx to be able to start a TLS connection with a default TLS configuration (no authentication) on the default or user-specified port.http, we will extend ctx to be able to start a simple TCP/IP connection on the default or user-specified port.These extensions have the highest priority (Conduit will try to initiate a communication with them first). By extension, we mean that the user is able to fill its own ctx and we don't overlap resolution functions from the given ctx.