class type async_in_channel =
raw_in_channel, which is defined by the Ocamlnet module
Netchannels(see there for an introduction into the idea of using objects as I/O channels). An asynchronous channel can indicate that there is no data in the input buffer. Furthermore, one can request notification in the case that there is no data or again data in the input buffer.
method input :
string -> int -> int -> int
input s k n: Reads channel data into the substring of
sbeginning at index
n. The channel is free to fill only a portion of the string (or even nothing). The method returns the number of bytes actually read.
End_of_file indicates that the end of the channel
is reached. The return value
0, however, means that no data
could be read.
method close_in :
unit -> unit
method pos_in :
method can_input :
method request_notification :
(unit -> bool) -> unit
can_inputchanges its value (or might change its value). The function returns
trueif there is still interest in notification, and
falseif notification must be disabled.
There can be any number of parallel active notifications. It is
allowed that a notification callback requests further notifications.