Re: Win32 Glib 2.8.x g_io_channel issues (receiving window messages on socket io channel)



Owen Taylor writes:
 > In general, if you are writing code that you want to be portable,
 > what you should do is add a watch on G_IO_IN | G_IO_HUP, and 
 > in that callback just always do a read.

giowin32.c:g_io_win32_check() has code currently to set G_IO_HUP only
if none of the other G_IO_ bits is set. I added that logic at some
point, but I can't recall why... could it be because some software
misbehaves if its callback is invoked with both G_IO_IN and G_IO_HUP?
Would it be safest to continue like this? Does the Unix implementation
ever set G_IO_HUP together with G_IO_IN (G_IO_OUT)?

--tml




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