package caqti

  1. Overview
  2. Docs
Unified interface to relational database libraries

Install

Dune Dependency

Authors

Maintainers

Sources

caqti-v2.1.2.tbz
sha256=ba4dfd5ff94376b5e003f682410b7b3b392c0bbaa0253679fe7671c2e07e895b
sha512=0416807fba620429ee4d64f3a6991238112e0e10dfba9703dced46cf332fd22135a9873007d025441228ce66fb192bf730d4bc776dd2c1a973d7604ab6e789e0

doc/caqti.platform/Caqti_platform/Connector/Make/argument-1-System/Net/index.html

Module System.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:

  • The family can be IPv4 or IPv6, where supported, and this must be encoded in the Sockaddr.t.
  • The socket type is restricted to STREAM.
  • The protocol is assumed to be selected automatically from address family, given the socket type restriction.

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.

type tcp_flow
type tls_flow
val connect_tcp : sw:Switch.t -> stdenv:stdenv -> Sockaddr.t -> (Socket.t, Caqti_error.msg) result Fiber.t
val tcp_flow_of_socket : Socket.t -> tcp_flow option
val socket_of_tls_flow : sw:Switch.t -> tls_flow -> Socket.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
OCaml

Innovation. Community. Security.