package tcpip

  1. Overview
  2. Docs

Parameters

module IP : Mirage_protocols.IP
module TM : Mirage_time.S
module C : Mirage_clock.MCLOCK
module R : Mirage_random.S

Signature

include Mirage_protocols.TCP with type ipaddr = IP.ipaddr and type ipinput = src:IP.ipaddr -> dst:IP.ipaddr -> Cstruct.t -> unit Lwt.t
type error = private [>
  1. | Mirage_protocols.Tcp.error
]
type write_error = private [>
  1. | Mirage_protocols.Tcp.write_error
]
type ipaddr = IP.ipaddr
type ipinput = src:IP.ipaddr -> dst:IP.ipaddr -> Cstruct.t -> unit Lwt.t
type flow
type t
val disconnect : t -> unit Lwt.t
val pp_error : error Fmt.t
val pp_write_error : write_error Fmt.t
val read : flow -> (Cstruct.t Mirage_flow.or_eof, error) Stdlib.result Lwt.t
val write : flow -> Cstruct.t -> (unit, write_error) Stdlib.result Lwt.t
val writev : flow -> Cstruct.t list -> (unit, write_error) Stdlib.result Lwt.t
val close : flow -> unit Lwt.t
val dst : flow -> ipaddr * int
val write_nodelay : flow -> Cstruct.t -> (unit, write_error) Stdlib.result Lwt.t
val writev_nodelay : flow -> Cstruct.t list -> (unit, write_error) Stdlib.result Lwt.t
val create_connection : ?keepalive:Mirage_protocols.Keepalive.t -> t -> (ipaddr * int) -> (flow, error) Stdlib.result Lwt.t
type listener = {
  1. process : flow -> unit Lwt.t;
  2. keepalive : Mirage_protocols.Keepalive.t option;
}
val input : t -> listeners:(int -> listener option) -> ipinput
val connect : IP.t -> t Lwt.t
OCaml

Innovation. Community. Security.