Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
Stdio
Stdio.File

Method Stdio.File()->write_oob()


Method write_oob

int write_oob(string data)
int write_oob(string format, mixed ... extras)

Description

Write out-of-band data to a stream.

Writes out-of-band data to a stream and returns how many bytes that were actually written. It can be less than the size of the given data if some data was written successfully and then something went wrong.

-1 is returned if something went wrong and no bytes were written. If only some data was written due to an error and that error persists, then a later call to write_oob() will fail and return -1.

If everything went fine, a call to errno() directly afterwards will return zero.

If more than one argument is given, sprintf() will be used to format them.

Note

Out-of-band data was not be supported on Pike 0.5 and earlier, and not on Pike 0.6 through 7.4 if they were compiled with the option '--without-oob'.

Note

It is not guaranteed that all out-of-band data sent from the other end will be received. Most streams only allow for a single byte of out-of-band data at a time. Some streams will send the rest of the data as ordinary data.

See also

read_oob() , write()