Re: g_io_channel_read_chars vs.g_io_channel_read

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

 



On Mon, 6 Dec 2004 14:12:33 -0800 (PST), Scott Dattalo
<scott@xxxxxxxxxxx> 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
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux