On 11/14/05, Tor Lillqvist <tml iki fi> wrote:
g_io_win32_check: WSAEnumNetworkEvents (1576, 0x618) revents={} condition={IN|ERR|HUP} events={}What seems to happen is that after watching a socket io channel once, I'll continue to see these messages until I restart the program - even if the io channel should have been cleaned up by g_source_remove().Any ideas what could be causing this?The giowin32.c code was changed in GLib 2.8 to use WSAEventSelect (and thus asynchronous IO) on sockets. Apparently this has some odd side-effects I haven't noticed. Do you think you can distill the problems into a minimal sample program...? --tml
I've hacked together a sample program using parts of gaim's web page retrieval code. It is not as simple as would be optimal, but hopefully it is good enough to show what is going on. In addition to the standard glib/gtk+ libs, this will also need to be linked against ws2_32. The program downloads a page from a web server using non blocking I/O. I didn't add support for DNS lookups and redirects, and etc. To recreate the problem: set the G_IO_WIN32_DEBUG environment variable and run the program. Notice that initially the console is not inundated with the "WSAEnumNetworkEvents" debug output when you move the mouse around the gtk+ window. Specify an IP address in the input box and hit the "Do Stuff" button (it can even be a bogus IP - as long as inet_addr() will recognize it). Notice that moving your mouse around the gtk+ window now causes lots of output in the console. Hopefully this is an adequate example. Thanks, -Daniel
Attachment:
io_channel_test2.c
Description: Text document