RE: [gnet] Problem using GConn under Win32 (MinGW)



Hi,

I have fixed this problem. Here is how.

It is located in the asynchrounous tcp handling code.

In the Win32 function gnet_tcp_socket_new_async_direct (in file tcp.c), I
ask the system to monitor G_IO_OUT events as well on the socket that had
just created (these were not monitored previously) : 

  state->connect_watch = 
    g_io_add_watch(gnet_private_io_channel_new(s->sockfd),
		   G_IO_IN | G_IO_OUT | G_IO_ERR,
		   gnet_tcp_socket_new_async_cb, 
		   state);


Perhaps monitoring all events (GNET_ANY_IO_CONDITION), as in the Unix code
could be fine as well.

Laurent Willemet.




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