Re: GIOChannel
- From: Harring Figueiredo <harringf yahoo com>
- To: Tim "Müller" <zen18864 zen co uk>, gtk <gtk-app-devel-list gnome org>
- Subject: Re: GIOChannel
- Date: Tue, 20 Jan 2004 07:16:44 -0800 (PST)
Tim,
Thanks .. I have taken a look at the Gnet Lib. I will use it instead of
reinventing the wheel.
Thanks again.
Harring.
--- Tim Müller <zen18864 zen co uk> wrote:
On Monday 19 January 2004 22:22, Harring Figueiredo wrote:
Folks, I am creating a GIOChannel, and I get the error:
[Invalid UTF-8] üôÿ¿
How can I set up so that it does not fail. (Thanks -- se code below)
NOTE: I don't even have a chance to write to it.
(snip)
/* create the channel */
server = g_io_channel_unix_new(socketfd);
if(server == NULL){
g_print("Count not create server..");
return FALSE;
}
g_io_channel_set_encoding (c, NULL, NULL);
g_io_channel_set_buffered (c, FALSE);
silly question maybe, but why 'c' and not
g_io_channel_set_encoding (server, NULL, NULL);
g_io_channel_set_buffered (server, FALSE);
the _set_encoding(server,NULL,NULL) is what should do the trick. It should
also be called right after you created the GIOChannel (more or less).
Btw, in case you haven't yet, you might also want to have a look at the GNet
library's GServer and GConn interfaces, which might just do exactly what you
want without all the GIOChannel hassle:
http://www.gnetlibrary.org/docs/gnet-server.html
http://www.gnetlibrary.org/docs/gnet-conn.html
A similar library is the fairly new libgnetwork, which seems to require
glib-2.3.x or newer though:
http://ftp.gnome.org/pub/GNOME/sources/libgnetwork/0.0/libgnetwork-0.0.5.tar.gz
Cheers
-Tim
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]