Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val 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.
val close : t -> unit
close t
closes t
, indicating that any subsequent input received should be discarded.