Class Netcgi_common.in_obj_of_descr


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


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 <= 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).
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
method private unsafe_really_input : string -> int -> int -> unit




SourceForge.net Logo