Class Netcgi_common.in_obj_of_descr


class in_obj_of_descr : buffer:string -> Unix.file_descr -> object .. end
new in_obj_of_descr ~buffer 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. It only renders the channel unusable from the safe methods.
Inherits


val fd : Unix.file_descr
The file descriptor passed as argument.
val in_buf : string
The internal buffer of length 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
Invariant: 0 <= in0; in1 <= String.length buffer.
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).
Raises 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.
Raises
method private unsafe_input : string -> int -> int -> int
unsafe_input buf ofs len same as #input but does not check whether the channel is closed whether ofs and len designate a valid substring of buf.
method private unsafe_really_input : string -> int -> int -> unit
unsafe_really_input buf ofs len same as #really_input but does not check whether the channel is closed whether ofs and len designate a valid substring of buf.