Method Stdio.File()->set_buffer_mode()


Method set_buffer_mode

void set_buffer_mode(Stdio.Buffer|int(0) in, Stdio.Buffer|int(0) out)

Description

Toggle the file to Buffer mode.

In this mode reading and writing will be done via Buffer objects, in the directions you included buffers.

Parameter in

Input buffer. If this buffer is non-empty, its contents will be returned after any already received data.

Parameter out

Output buffer. If this buffer is non-empty, its contents will be sent after any data already queued for sending.

Note

Normally you call write to re-trigger the write callback if you do not output anything in it (which will stop it from re-occuring again).

This will work with buffered output mode as well, but simply adding more data to the output buffer will work as well.

See also

query_buffer_mode()