Sockets with GTK 2.8.9 on WIN32



I've a problem on an application on WIN32 with GTK 2.8.x that works flawlessly with GTK 2.6.x (always on win32) or GTK 2.8.x (on unix).

It seems that with 2.8.9 (the installer version got from gimp-win home) the sockets are handled as non blocking also if you don't specify this.

It's a wanted behaviour?

Specifically I often receive "0" if I call recv() in my gdk_input_add( GDK_INPUT_READ ) call, this happens on GTK 2.6 and early only when the connection is closed by the remote peer.

With GTK 2.8, and only on WIN32, I often receive 0 from recv and an error code of WSAEWOULDBLOCK.

This is a problem since my code often rely on the fact socket calls are blocking...

It's a GTK bug or I'm doing something wrong?

I've looked in the documentation and I've seen that gdk_input_add is obsolete and I should use g_io_channels, the problem is that I see only a g_io_channel_new_unix in the documentation, that tells also that the support for win32 is incomplete...

Bye,
 Gabry






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