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.3.tbz
sha256=e07ecc6ed9ae9dbf5ae24f7ffcc439357d37e3efe2748c4d4e0dcad732ea3712
sha512=1a5a0f288a812ae60fecd9a693aaeb44598fb6bbf33dd5f1687662da79dc2b5c6a6c45cc37f5d031c126816356fecf0ef04372e85f0813e1589ee16bbd19fb44

doc/httpcats.runtime/Runtime/Make/argument-1-Flow/index.html

Parameter Make.Flow

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.

  • raises Closed_by_peer

    if the peer closed the connection on its side.

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