Sys.Net
module Sockaddr : sig ... end
val getaddrinfo :
stdenv:stdenv ->
[ `host ] Domain_name.t ->
int ->
(Sockaddr.t list, [> `Msg of string ]) result Fiber.t
This should be a specialized version of getaddrinfo, which only returns entries which is expected to work with the corresponding connect on the platform implementing this interface. In particular:
Sockaddr.t
.All returned values are TCP destinations. If a distinction can be made, an empty list indicates that the address has no DNS entries, while an error return indicates that an appropriate DNS server could not be queried.
val convert_io_exception : exn -> Caqti_error.msg option
If the read and write operations in Socket raise exceptions other than End_of_file
and Failure
, this function is used to intercept them.
module Socket : System_sig.SOCKET_OPS with type 'a fiber := 'a Fiber.t
A socket with input and output channels and dedicated IO functions. This bundling is done to support the various APIs involved for networking and StartTLS.
val connect_tcp :
sw:Switch.t ->
stdenv:stdenv ->
Sockaddr.t ->
(Socket.t, Caqti_error.msg) result Fiber.t
module type TLS_PROVIDER =
System_sig.TLS_PROVIDER
with type 'a fiber := 'a Fiber.t
and type tcp_flow := tcp_flow
and type tls_flow := tls_flow
val register_tls_provider : (module TLS_PROVIDER) -> unit
val tls_providers : Caqti_connect_config.t -> (module TLS_PROVIDER) list