Plasma GitLab Archive
Projects Blog Knowledge

Class type Netchannels.compl_in_channel

class type compl_in_channel = object .. end

Further methods usually supported by ocamlnet channel implementations. These methods are only reasonable when the channel is of blocking type, i.e. waits for input when not enough data are available to perform an operation. Implementations may choose to fail when they detect the channel is non-blocking.


method really_input : Stdlib.Bytes.t -> int -> int -> unit

Reads exactly as many octets from the channel as the second int argument specifies. The octets are placed at the position denoted by the first int argument into the string.

When the end of the channel is reached before the passed number of octets are read, the exception End_of_file is raised.

method really_input_string : int -> string

really_input_string ic len reads len characters from channel ic and returns them in a new string. Raise End_of_file if the end of file is reached before len characters have been read.

method input_char : unit -> char

Reads exactly one character from the channel, or raises End_of_file

method input_line : unit -> string

Reads the next line from the channel. When the channel is already at the end before input_line is called, the exception End_of_file is raised.

method input_byte : unit -> int

Reads exactly one octet from the channel and returns its code, or raises End_of_file

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml