Re: Glib::IOChannel in sockets... (2)



On Mon, 2009-12-21 at 18:42 +0100, Glus Xof wrote: 
> Hello guys,
> 
> Some days ago, I wrote,
> 
> 2009/12/17 Glus Xof <gtglus gmail com>:
> > Hello guys,
> >
> > I was unsuccessfully googling, searching for an explanations about how
> > to use Glib::IOChannel in case of Sockets: a little tutorial, or a
> > code example...
> 
> and I truly need to communicate two proceses running in different
> machines (by sockets), both sending & receiving Glib::ustring values.
> For the moment, using socket(), bind(), listen(), accept(),
> connect()... is enough to interchange std::string values, but I get
> "Glib::ConvertError"s with Glib::ustring.

Maybe setting the encoding would make a difference.

The following excerpt from the Glib::IOChannel docs[1] seems relevant:

"Note that IOChannels implement an automatic implicit character set
conversion to the data stream, and usually will not pass by default
binary data unchanged. To set the encoding of the channel, use e.g.
set_encoding("ISO-8859-15"). To set the channel to no encoding, use
set_encoding() without any arguments."

[1]
http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1IOChannel.html#_details


> 
> I'm not sure, but I think that the Glibmm & GIOmm libraries could
> solve this... but I don't reach to understand how to use them.
> 
> Pls, a little tutorial, a piece of code... could helps me.
> 
> Thanks,
> 
> Glus
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list

-- 
José









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