Glib g_io_channel_read: can't be called deprecated
- From: "Dmitry M. Shatrov" <zzidre mail ru>
- To: gtk-devel-list gnome org
- Subject: Glib g_io_channel_read: can't be called deprecated
- Date: Thu, 08 Jul 2004 07:17:28 +0400
Hello.
Why g_io_channel_read is called "deprecated" in glib docs?
Here's why I think this is wrong:
I need to do some IPC through named fifo's (those created with mkfifo).
Confused by docs, I at first used g_io_channel_read_chars with NULL
encoding,
as according to documentation it is "safe for binary data".
I expect that after calling g_io_channel_flush () on writer's side the
reader
will likely to receive all pending data throug g_io_channel_read_chars,
but it does not receive anything, cus read_chars tries to gather
the full buffer before it returns - such behavior is OK if I read from a
file
and is absolutely unexpected if I read from a fifo channel.
The only way to do what I described is to use g_io_channel_read,
which is implemented the way it should be: it returns partial data
immediately
if there is any.
So, I offer to remove 'deprecated' mark from g_io_channel_read and this way
guarantee that it will be supported further.
The fact that g_io_channel_read_chars misbehaves with
non-generic-file objects should be documented too.
Regards, Dmitry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]