package tcpip

  1. Overview
  2. Docs
include Mirage_protocols_lwt.TCP with type ipaddr = Ipaddr.V4.t and type ipinput = unit Lwt.t and type flow = Lwt_unix.file_descr and type error = [ Mirage_protocols.Tcp.error | `Exn of exn ] and type write_error = [ Mirage_protocols.Tcp.write_error | `Exn of exn ]
type error = [
  1. | `Exn of exn
  2. | `Refused
  3. | `Timeout
]
type write_error = [
  1. | `Closed
  2. | `Exn of exn
  3. | `Refused
  4. | `Timeout
]
type buffer = Cstruct.t
type ipaddr = Ipaddr.V4.t
type ipinput = unit Lwt.t
type 'a io = 'a Lwt.t
type t
val disconnect : t -> unit io
val pp_error : error Fmt.t
val pp_write_error : write_error Fmt.t
val read : flow -> (buffer Mirage_flow.or_eof, error) Stdlib.result io
val write : flow -> buffer -> (unit, write_error) Stdlib.result io
val writev : flow -> buffer list -> (unit, write_error) Stdlib.result io
val close : flow -> unit io
val dst : flow -> ipaddr * int
val write_nodelay : flow -> buffer -> (unit, write_error) Stdlib.result io
val writev_nodelay : flow -> buffer list -> (unit, write_error) Stdlib.result io
val create_connection : ?keepalive:Mirage_protocols.Keepalive.t -> t -> (ipaddr * int) -> (flow, error) Stdlib.result io
type listener = {
  1. process : flow -> unit io;
  2. keepalive : Mirage_protocols.Keepalive.t option;
}
val input : t -> listeners:(int -> listener option) -> ipinput
val connect : Ipaddr.V4.t option -> t Lwt.t
OCaml

Innovation. Community. Security.