Re: Sockets with GTK 2.8.9 on WIN32
- From: Gabriele Greco <gabriele greco darts it>
- To: Daniel Atallah <daniel atallah gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Sockets with GTK 2.8.9 on WIN32
- Date: Mon, 13 Feb 2006 15:49:36 +0100
Daniel Atallah wrote:
That is one of the changes that were made in Glib 2.8.x. All of the
win32 GIOChannel stuff was changed such that it'll leave your sockets
in non-blocking mode. See this bug report for more information:
http://bugzilla.gnome.org/show_bug.cgi?id=147392
This seems very strange for me since glib 2.8 on Unix does not behave
this way.
How can GTK be used as a multiplatform development system if it behave
in different ways for the different platform it supports?
Basically, if you want your socket to be non-blocking, you have to
make it so in the input function every time it is triggered.
So I've to add something like this in my input function (error checking
omitted):
#ifdef WIN32
unsigned long par = 0;
ioctlsocket(fd, FIONBIO, &par);
#endif
This is quite ugly.
I thought that I had seen this in the documentation somewhere, but
apparently not.
I've not found anything related to GLIB 2.6 -> 2.8 differences at least at:
http://www.gtk.org/api/
(incompatible differences seems related to 2.0 -> 2.2 migration)
Bye,
Gabry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]