package conduit-mirage

  1. Overview
  2. Docs

Module Conduit_mirageSource

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

Dynamic flows.

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

The type for callback values.

Sourcemodule type Handler = sig ... end

The signature for runtime handlers

TCP

The type for client connections.

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

address and destination port

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

address and destination port

listening port

Sourcetype 'a stackv4
Sourceval stackv4 : (module Mirage_stack.V4 with type t = 'a) -> 'a stackv4

VCHAN

Sourcetype vchan_client = [
  1. | `Vchan of [ `Direct of int * Vchan.Port.t | `Domain_socket of string * Vchan.Port.t ]
]
Sourcetype vchan_server = [
  1. | `Vchan of [ `Direct of int * Vchan.Port.t | `Domain_socket ]
]
Sourcemodule type VCHAN = Vchan.S.ENDPOINT with type port = Vchan.Port.t
Sourcemodule type XS = Xs_client_lwt.S
Sourcetype vchan
Sourcetype xs
Sourceval vchan : (module VCHAN) -> vchan
Sourceval xs : (module XS) -> xs

TLS

Sourcetype 'a tls_client = [
  1. | `TLS of Tls.Config.client * 'a
]
Sourcetype 'a tls_server = [
  1. | `TLS of Tls.Config.server * 'a
]

The type for client configuration values.

Sourceval sexp_of_client : client -> Sexplib0.Sexp.t
Sourceval client_of_sexp : Sexplib0.Sexp.t -> client
Sourceval __client_of_sexp__ : Sexplib0.Sexp.t -> client

The type for server configuration values.

Sourceval sexp_of_server : server -> Sexplib0.Sexp.t
Sourceval server_of_sexp : Sexplib0.Sexp.t -> server
Sourceval __server_of_sexp__ : Sexplib0.Sexp.t -> server
Sourceval client : Conduit.endp -> client Lwt.t

Resolve a conduit endpoint into a client configuration.

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

Resolve a confuit endpoint into a server configuration.

Sourcetype conduit

The type for conduit values.

Sourcemodule type S = sig ... end

The signature for Conduit implementations.

include S
Sourcetype t = conduit
Sourceval empty : t

The empty conduit.

Sourcemodule With_tcp (S : Mirage_stack.V4) : sig ... end
Sourceval with_tcp : t -> 'a stackv4 -> 'a -> t Lwt.t

Extend a conduit with an implementation for TCP.

Sourceval with_tls : t -> t Lwt.t

Extend a conduit with an implementation for TLS.

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

Extend a conduit with an implementation for VCHAN.

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

Connect a conduit using a client configuration value.

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

Configure a server using a conduit configuration value.

OCaml

Innovation. Community. Security.