class in_obj_of_descr :buffer_len:int -> Unix.file_descr ->
object
..end
new in_obj_of_descr ~buffer_len fd
creates a
Netchannels.in_obj_channel
enriched with some methods to input
until a given character is reached.
Remark: The method #close_in()
does not close the file
descriptor fd
because it usually also serves for output.
Inherits
Netchannels.in_obj_channel
val fd : Unix.file_descr
val in_buf : string
buffer_len
. The data in the
in_buf
is at indexes i
s.t. in0 <= i < in1
.val mutable in0 : int
val mutable in1 : int
0 <= in0
; in1 <= buffer_len
.
in1 < 0
indicates a closed channel.val mutable pos_in : int
method private fill_in_buf : unit -> unit
#fill_in_buf()
refills in_buf
if needed (when empty). After
this in0 < in1
or in1 = 0
, the latter indicating that the
operation would block (then in0 = 0
also).End_of_file
if no more data is available.method input_all_till : char -> string
#input_all_till c
returns the next chunk of input until c
is reached. c
is not returned and is skipped.End_of_file
if the end of file is reached before any
character is read.Sys_blocked_io
for non-blocking I/O if, before c
is
found, we find ourselves in a situation where there are no
bytes to read.method private unsafe_input : string -> int -> int -> int
method private unsafe_really_input : string -> int -> int -> unit