[gnet-dev] Windows sockets



FYI,

Basically the way all of glib's iochannels work on windows is that a thread is started to wait for activity for each channel. In the case of a sockets it wait on a select(), all other channels the thread does a busy wait. I am aware that the code has a signaling problem that causes delay in the delivery of data. Right now the data is only delivered on a timeout or perhaps if something else caused the main loop to break out of its wait. I have things setup such that when something happens on the channel, channel->data_avail_event is set. I am in the process on trying to figure out a good way to integrate this into the main loop. Any suggestions?

gnet_io_channel_readn blocks and it is supposed to block. All it does is call g_io_channel_read in a loop. If you want the option of the old behavior send an email to gnet-dev gnetlibrary org and David will consider it.

I don't have anything to add to the fstat() problem off the top if my head. I'm using mingw.

In response to "Why aren't there system independent socket functions in the glib implementation?" GNet includes WinSock2 code, while glib does not. That might not matter to people now. Anyhow, I am trying to catch-up to the *nix code in glib & GNet.

GNet 1.1.2 came out recently. I'm not going to do a new release for windows since I haven't made any progress on my problems since the last one. (The problems are in the experimental code.)

Andy Lanoix






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