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/Flow/module-type-S/index.html

Module type Flow.SSource

type t
val read : t -> Bstr.t -> off:int -> len:int -> int

read flow bstr ~off ~len reads at most len bytes from flow into bstr at off and returns how many bytes were actually read. 0 means end-of-input.

val writev : t -> Bstr.t Faraday.iovec list -> unit

writev flow iovecs writes all the given iovecs to flow.

NOTE: the buffers of iovecs belong to the caller and are reused as soon as writev returns. An implementation which defers the actual transmission (such as utcp, which keeps the segment in its own state) must take a copy.

val close : t -> unit
val shutdown : t -> [ `read | `write | `read_write ] -> unit