package dream-httpaf

  1. Overview
  2. Docs
Internal: shared http/af stack for Dream (server) and Hyper (client)

Install

Dune Dependency

Authors

Maintainers

Sources

dream-1.0.0-alpha3.tar.gz
sha256=f289253109aee39ab912f9f38aa5e7b44e0b4b01fd7d3dd5c407b034c57f01bc
md5=148588e6f584cd9f2438e56da7df2f56

doc/dream-httpaf.httpaf/Httpaf/Body/Reader/index.html

Module Body.ReaderSource

Sourcetype t
Sourceval schedule_read : t -> on_eof:(unit -> unit) -> on_read:(Bigstringaf.t -> off:int -> len:int -> unit) -> unit

schedule_read t ~on_eof ~on_read will setup on_read and on_eof as callbacks for when bytes are available in t for the application to consume, or when the input channel has been closed and no further bytes will be received by the application.

Once either of these callbacks have been called, they become inactive. The application is responsible for scheduling subsequent reads, either within the on_read callback or by some other mechanism.

Sourceval close : t -> unit

close t closes t, indicating that any subsequent input received should be discarded.

Sourceval is_closed : t -> bool

is_closed t is true if close has been called on t and false otherwise. A closed t may still have bytes available for reading.

OCaml

Innovation. Community. Security.