package piaf
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=00c3bea6d1a8c77dc18bbbbf1f449a78253cf17391ad153751b2e87f71307265
sha512=0f35e88b78ec1f1cd06a972ee69e29a8983b4c07dbc0268cc9764d8df5d9c2402cc3710874f54a111095fb57a08fe582d99d1b7e070e141e260af6ced50172aa
doc/piaf.h2/H2/Body/index.html
Module H2.BodySource
val schedule_read :
[ `read ] t ->
on_eof:(unit -> unit) ->
on_read:(Bigstringaf.t -> off:int -> len:int -> unit) ->
unitschedule_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.
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.
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.
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.
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.
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.
close_reader t closes t, indicating that any subsequent input received should be discarded.
close_writer 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.