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.3.0.tbz
sha256=ff77d72ec8a294632e99757d1ae1a96073e6fb282d1c0e1e514b47b19976959d
sha512=0efc177c18cc74a8e24e6405331f716aeb780b528176b15c64b1e698cab0113cc25e30e0c9a075b51c1eb780c844734c8c930f9d18e351e73706d9c3d3738b85

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