package tcpip

  1. Overview
  2. Docs
type error = Tcpv4_socket.error
type write_error = Tcpv4_socket.write_error
type buffer = Cstruct.t
type ip = Ipaddr.V4.t option
type ipaddr = Ipaddr.V4.t
type ipinput = unit Lwt.t
type flow = Lwt_unix.file_descr
type 'a io = 'a Lwt.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 -> t Lwt.t
OCaml

Innovation. Community. Security.