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.2.tbz
sha256=9f4227667fbb8da0db7f759a30009d8770cf31f91f7b09a471740055f47cd6b8
sha512=9119d5664e7c318f92e05980bf9f758421e1d9e7d6ae486e730e7ddb3f3a375bf33c468cca4287f02ebee4dc68f125f18c2aa10a7399f74fa273126571488623

doc/httpcats.runtime/Runtime/Make/index.html

Module Runtime.MakeSource

Make runs an HTTP state-machine on top of a flow. The Runtime itself allocates no scratch buffer: it hands the connection's bigstring to Flow.S.read and the Faraday iovecs to Flow.S.writev. A flow which can only speak bytes/string goes through Flow.Of_bytes, which owns the buffer it needs.

Parameters

module Flow : Flow.S
module Runtime : S

Signature

Sourcetype conn = Runtime.t
Sourcetype flow = Flow.t
Sourceval run : conn -> ?tags:Logs.Tag.set -> ?read_buffer_size:int -> ?upgrade:(flow -> unit) -> flow -> unit Miou.t

run conn ?read_buffer_size flow runs the given state-machine conn on top of flow.

read_buffer_size is the initial size of the bigstring where we accumulate what the peer sends us (it grows on demand); it should be H1.Config.read_buffer_size / H2.Config.read_buffer_size.