How to properly use GIOChannel buffers?


I've got a specific question about Glib GIOChannel buffers. How to
ensure that the buffers will always be flushed as soon as possible?
I've tried to set IO watch but it's called with G_IO_OUT if there's
free space in the buffer, not if the buffer can be flushed.

What am i missing here? Shouldn't the buffers be flushed automatically
as soon as there's a possibility to write to the fd?

FYI i'm trying to use glib buffering feature to buffer data going to a
pty which is needed in case the receiving application is busy and
in-kernel pty buffer can overflow.

Happy hacking!
Be free, use free ( software!
mailto:fercerpav gmail com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]