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.0.tbz
sha256=3587d8d1e297025340ab59b934acc2c96fabfc36ff60f07a7d64e7067521e631
sha512=8bb3be3ec6ff35e5ced00cd99d87c4a2f3941571cce90b54817de68374143a217b65ab1bd211a92414664a344fd41b61e1e92e908fcda900331cb14e5a2dd6f1

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