Extracted from Pike v7.4 release 341 at 2005-11-30.
pike.ida.liu.se
[Top]
predef::
Stdio
Stdio.File

Method Stdio.File()->set_nonblocking()


Method set_nonblocking

void set_nonblocking()

Description

Sets this file to nonblocking operation.

See also

set_blocking()


Method set_nonblocking

void set_nonblocking(function(mixed:void) read_callback, function(mixed:void) write_callback, function(mixed:void) close_callback)
void set_nonblocking(function(mixed:void) read_callback, function(mixed:void) write_callback, function(mixed:void) close_callback, function(mixed:void) read_oob_callback, function(mixed:void) write_oob_callback)
void set_nonblocking()

Description

This function sets a stream to nonblocking mode. When data arrives on the stream, read_callback will be called with some or all of this data. When the stream has buffer space over for writing, write_callback will be called so that you can write more data to it. If the stream is closed at the other end, close_callback will be called.

When out-of-band data arrives on the stream, read_oob_callback will be called with some or all of this data. When the stream allows out-of-band data to be sent, write_oob_callback will be called so that you can write out-of-band data to it.

All callbacks will have the id of file as first argument when called (see set_id() ).

Note

If no arguments are given, the callbacks will be cleared.

Note

Out-of-band data will note be supported if Pike was compiled with the option '--without-oob'.

See also

set_blocking() , set_id() , set_read_callback() , set_write_callback() , set_close_callback()