Re: g_io_channel



On Fri, 8 Jul 2005, Vivien Malerba wrote:
On 7/8/05, uzytkownik22 gazeta pl <uzytkownik22 gazeta pl> wrote:
g_io_channel_write_chars(channel, (const gchar *)your_struct, sizeof
(your_struct), &written, errors);
Beware however that depending on the contents of your structure, you
may have some problems if you exchange data this way between machines
which do not have the same endian-ness (if it's on the same machine,
then no problem!).

You should also set the channel encoding (using the g_io_channel_set_encoding function) to NULL to avoid any unwanted character conversions.

JV



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