[gnet] Win32 async iochannels



I am able to replicate Adam’s problem here but I am seeing other problems. My second client never gets any data and the first client sometimes segfualts.

I am also able to replicate Martyn problem with echoclient.exe --async <port number>.

Both problems are going to be related to glib’s iochannel code in giowin32.c. I spent months debugging this back in 2001 to get echoclient.exe --async <port number> working. There have been changes since then apparently with how the thread synchronization code works.

Tor and I implemented socket iochannels to each have a thread and in that thread we do a blocking select() on the socket. When we get activity you should get a callback from the main loop using g_io_win32_dispatch(). Take a look at select_thread(), g_io_win32_sock_read() and g_io_win32_sock_write() in giowin32.c. 

Unfortunately I won’t be able to start debugging on these issues until Saturday at the earliest. 

Andy Lanoix



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