package hvsock

  1. Overview
  2. Docs

Parameters

module Fn : S.FN

Signature

type 'a io = 'a Lwt.t
type buffer = Cstruct.t
type error = [
  1. | `Unix of Unix.error
]
val pp_error : Stdlib.Format.formatter -> [< `Unix of Unix.error ] -> unit
type write_error = [
  1. | Mirage_flow.write_error
  2. | error
]
val pp_write_error : Stdlib.Format.formatter -> [< `Closed | `Unix of Unix.error ] -> unit
type flow = {
  1. fd : RW.t;
  2. read_buffers_max : int;
  3. read_max : int;
  4. mutable read_buffers : Cstruct.t list;
  5. mutable read_buffers_len : int;
  6. read_buffers_m : Mutex.t;
  7. read_buffers_c : Condition.t;
  8. read_histogram : Histogram.t;
  9. mutable write_buffers : Cstruct.t list;
  10. mutable write_buffers_len : int;
  11. write_buffers_m : Mutex.t;
  12. write_buffers_c : Condition.t;
  13. write_buffers_max : int;
  14. write_max : int;
  15. mutable write_flushed : bool;
  16. write_histogram : Histogram.t;
  17. mutable closed : bool;
  18. mutable shutdown_read : bool;
  19. mutable read_thread_exit : bool;
  20. mutable shutdown_write : bool;
  21. mutable shutdown_write_complete : bool;
  22. mutable write_error : bool;
}
val connect : ?message_size:int -> ?buffer_size:int -> RW.t -> flow
val detach : ('a -> 'b) -> 'a -> 'b Lwt.t
val wait_write_flush : flow -> unit
val close : flow -> unit Lwt.t
val shutdown_read : 'a -> unit Lwt.t
val shutdown_write : flow -> unit Lwt.t
val wait_for_data_or_eof : flow -> int -> unit
val read : flow -> ([> `Data of Cstruct.t | `Eof ], 'a) Stdlib.result Lwt.t
val read_into : 'a -> 'b -> 'c
val wait_for_space : flow -> int -> unit
val writev : flow -> Cstruct.t list -> (unit, [> `Closed ]) Stdlib.result Lwt.t
val write : flow -> Cstruct.t -> (unit, [> `Closed ]) Stdlib.result Lwt.t
OCaml

Innovation. Community. Security.