class out_obj_of_descr :buffer:string -> Unix.file_descr ->
object
..end
new out_obj_of_descr ~buffer fd
creates a buffered
Netchannels.out_obj_channel
.
Remark: The method #close_out
does not close the file
descriptor fd
because it may serve for more connections.
Inherits
val fd : Unix.file_descr
val out_buf : string
buffer_len
. The data in the
in_buf
is at indexes i
s.t. in0 <= i < in1
.val mutable out1 : int
val mutable pos_out : int
method private write : string -> int -> int -> int
write buf ofs len
writes the substring buf.[ofs
.. ofs+len-1]
to the file descriptor. It is assumed it will
only be used with len <= buffer_len
. Returns the number of
characters actually written (must be at least 1 unless the
channel is non-blocking and writing would block).
You may want to override this function with an appropriate
version for your connector (because, say, the output must be
cut into chunks).
method private unsafe_output : string -> int -> int -> int
unsafe_output buf ofs len
same as #output
but does not
check whether the channel is closed whether ofs
and len
designate a valid substring of buf
.method private unsafe_really_output : string -> int -> int -> unit