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-alpha6.tar.gz
sha256=8d3b6344c0e175aca628b3d5bb8ee58265e8c1074fc2d40d63f136fef83daf90

doc/dream-httpaf.dream-h2/Dream_h2/H2/Body/Writer/index.html

Module Body.WriterSource

Sourcetype t
Sourceval write_char : t -> char -> unit

write_char w char copies char into an internal buffer. If possible, this write will be combined with previous and/or subsequent writes before transmission.

Sourceval write_string : t -> ?off:int -> ?len:int -> string -> unit

write_string w ?off ?len str copies str into an internal buffer. If possible, this write will be combined with previous and/or subsequent writes before transmission.

Sourceval write_bigstring : t -> ?off:int -> ?len:int -> Bigstringaf.t -> unit

write_bigstring w ?off ?len bs copies bs into an internal buffer. If possible, this write will be combined with previous and/or subsequent writes before transmission.

Sourceval schedule_bigstring : t -> ?off:int -> ?len:int -> Bigstringaf.t -> unit

schedule_bigstring w ?off ?len bs schedules bs to be transmitted at the next opportunity without performing a copy. bs should not be modified until a subsequent call to flush has successfully completed.

Sourceval flush : t -> (unit -> unit) -> unit

flush t f makes all bytes in t available for writing to the awaiting output channel. Once those bytes have reached that output channel, f will be called.

The type of the output channel is runtime-dependent, as are guarantees about whether those packets have been queued for delivery or have actually been received by the intended recipient.

Sourceval close : t -> unit

close t closes t, causing subsequent write calls to raise. If t is writable, this will cause any pending output to become available to the output channel.

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 pending output.

OCaml

Innovation. Community. Security.