Re: g_io_channel_read_chars vs.g_io_channel_read



On Mon, 6 Dec 2004 14:12:33 -0800 (PST), Scott Dattalo
<scott dattalo com> wrote:
[...]
> Does anyone have an idea why g_io_channel_read_chars() behaves
> different than g_io_channel_read()?

Sorry I havent got a clue...

But you could try something like:

while ((g_io_channel_get_buffer_condition () & G_IO_IN) != FALSE) {
     // read one byte at a time
}

And then you should be able to avoid blocking even in the case of
some kind of system fault ;-)

Cheers,
                                                 -Tristan



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