package httpcats

  1. Overview
  2. Docs
A simple HTTP client / server using h1, h2, and miou

Install

dune-project
 Dependency

Authors

Maintainers

Sources

httpcats-0.2.1.tbz
sha256=a40e9e88cd5555f5398c34cb2bff9837a053f8c6215c1aeb3269032a74a41cd8
sha512=b6f3bf1ba669e88c80adf779c9186513b0427377f1ca0bb7f896a99241373ef2cc3f59ff786fb7fc99e7bf79d92e2fad1fa52e3172c3e30a37b97cb405e2ac43

doc/src/httpcats.runtime/flow.ml.html

Source file flow.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
exception Closed_by_peer
(* NOTE(dinosaure): it may happen that it is impossible to [write] to a peer.
   The standard error is [EPIPE] as well as a [SIGPIPE] signal that we ignore
   (at the application level). The user must transform this error by raising the
   [Closed_by_peer] exception. In this way, the "Runtime" is informed that the
   connection has been closed. *)

module type S = sig
  type t

  val read : t -> ?off:int -> ?len:int -> bytes -> int
  val write : t -> ?off:int -> ?len:int -> string -> unit
  val close : t -> unit
  val shutdown : t -> [ `read | `write | `read_write ] -> unit
end