How to determine EOF after g_io_channel_read_to_end?



I want to implement the http client by iochannel, just send the request,
then save all the data to a buffer util the connection is closed.
Because the data may be binary, so I think it is not good to use
g_io_channel_read_line, I think g_io_channel_read_to_end should be most
suitable, but I can't determine the EOF by this function, if I don't
shutdown the iochannel by EOF information, the io watch function will
always be called with G_IO_IN.
How to determine EOF when using g_io_channel_read_to_end and doesn't use
g_io_channel_read_line?

Much thanks!




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