Receiving multiple lines with g_io_channel_read_line


I've had some sucess using g_io_channel_read_line to
receive terminated lines from a fifo formed with a
server app i wrote. However i need to receive unknown
amounts of bytes with line terminators until a final
escape character is received, then act on this packet.
Is this possible to do in one callback, or should i be
using multiple callbacks and a global gchar to buffer
until the escape character - or would it be better to
somehow use g_io_channel_read? I've seen a previous
post about receiving the characters one at a time,
which i could use - but i couldn't get it to work
properly and didn't think this would be too efficient.

Any ideas?

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