package tcpip

  1. Overview
  2. Docs

Parameters

module IP : Mirage_protocols_lwt.IP
module TM : Mirage_time_lwt.S
module C : Mirage_clock.MCLOCK
module R : Mirage_random.C

Signature

include Mirage_protocols_lwt.TCP with type ip = IP.t and 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 buffer = Cstruct.t
type ip = IP.t
type ipaddr = IP.ipaddr
type ipinput = src:IP.ipaddr -> dst:IP.ipaddr -> Cstruct.t -> unit Lwt.t
type flow
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) Pervasives.result io
val write : flow -> buffer -> (unit, write_error) Pervasives.result io
val writev : flow -> buffer list -> (unit, write_error) Pervasives.result io
val close : flow -> unit io
type callback = flow -> unit io
val dst : flow -> ipaddr * int
val write_nodelay : flow -> buffer -> (unit, write_error) Pervasives.result io
val writev_nodelay : flow -> buffer list -> (unit, write_error) Pervasives.result io
val create_connection : t -> (ipaddr * int) -> (flow, error) Pervasives.result io
val input : t -> listeners:(int -> callback option) -> ipinput
val connect : ip -> C.t -> t Lwt.t
OCaml

Innovation. Community. Security.