package conduit

  1. Overview
  2. Docs

Functorial connection establishment interface that is compatible with the Mirage libraries.

module Flow : V1_LWT.FLOW

Dynamic flows.

type callback = Flow.flow -> unit Lwt.t

The type for callback values.

module type Handler = sig ... end

The signature for runtime handlers

TCP

The type for client connections.

type tcp_client = [
  1. | `TCP of Ipaddr.t * int
]

address and destination port

and tcp_server = [
  1. | `TCP of int
]

address and destination port

listening port

type 'a stackv4
val stackv4 : (module V1_LWT.STACKV4 with type t = 'a) -> 'a stackv4

VCHAN

type vchan_client = [
  1. | `Vchan of [ `None ]
]
type vchan_server = [
  1. | `Vchan of [ `None ]
]
module type VCHAN = sig ... end
module type XS = sig ... end
type vchan
type xs
val vchan : (module VCHAN) -> vchan
val xs : (module XS) -> xs

TLS

type 'a tls_client = [
  1. | `TLS of [ `None ]
]
type 'a tls_server = [
  1. | `TLS of [ `None ]
]

The type for client configuration values.

include sig ... end
val client_of_sexp : Sexplib.Sexp.t -> client
val __client_of_sexp__ : Sexplib.Sexp.t -> client
val sexp_of_client : client -> Sexplib.Sexp.t

The type for server configuration values.

include sig ... end
val server_of_sexp : Sexplib.Sexp.t -> server
val __server_of_sexp__ : Sexplib.Sexp.t -> server
val sexp_of_server : server -> Sexplib.Sexp.t
val client : Conduit.endp -> client Lwt.t

Resolve a conduit endpoint into a client configuration.

val server : Conduit.endp -> server Lwt.t

Resolve a confuit endpoint into a server configuration.

type conduit

The type for conduit values.

module type S = sig ... end

The signature for Conduit implementations.

include S
type t = conduit
val empty : t

The empty conduit.

module With_tcp (S : V1_LWT.STACKV4) : sig ... end
val with_tcp : t -> 'a stackv4 -> 'a -> t Lwt.t

Extend a conduit with an implementation for TCP.

val with_tls : t -> t Lwt.t

Extend a conduit with an implementation for TLS.

val with_vchan : t -> xs -> vchan -> string -> t Lwt.t

Extend a conduit with an implementation for VCHAN.

val connect : t -> client -> Flow.flow Lwt.t

Connect a conduit using a client configuration value.

val listen : t -> server -> callback -> unit Lwt.t

Configure a server using a conduit configuration value.

module Context (T : V1_LWT.TIME) (S : V1_LWT.STACKV4) : sig ... end
OCaml

Innovation. Community. Security.