Re: [gnet-dev] Cross-compiling gnet for win32 from linux
- From: Gorshkov <listsubscriptions oghma on ca>
- To: gnet-dev lists gnetlibrary org
- Subject: Re: [gnet-dev] Cross-compiling gnet for win32 from linux
- Date: Wed, 8 Mar 2006 00:13:34 -0500
On Tuesday 07 March 2006 14:44, ben levitt wrote:
> Well, I now have cvs gnet compiling for windows, and my gtkmm app
> compiling with this gnet. Everything now basically works (yay!), but
> I have a very strange bug.
>
Why did I know what you were going to say next as soon as I saw this .....
> My app runs a command-line server and some gui clients. I'm using
> gnet tcp sockets. I'm building and running with gtkmm as installed by
> the 2.8.3 installers.
>
> On each client, I set up a watch like this:
> g_io_add_watch (io_channel,
> (GIOCondition)(G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL),
> &handle_event, data);
>
> If I drag a client's window accross the screen while gnet is
> communicating, hadle_event gets called with cond=0, and this client
> gets disconnected from the server. This doesn't happen in a linux
> build, only in windows. (My code is not doing anything
> network-related on window movement, resizing, redrawing, etc)
>
> I'm thinking this could have something to do with gnet events and
> window movement events brawling in glib's main loop. But I haven't
> gone digging into glib at all yet. (Hoping not to...)
>
> Does this sound familiar to anyone? Any idea what I could be doing
> wrong, or how I could fix/work around this? Or if it might be a
> gnet/glib bug?
>
Yes, it sounds very familiar .... I ran into this myself not more than a month
ago. The problem is, in fact, an interaction between glib/gtk/something there
and gnet. I asked on the gtk-app-dev list, and all I got for asking about it
was that my code was probably buggy because I must have written it in C ....
not the most helpfull answer I ever found.
I eliminated the problem by dropping gnet, and using the windows network APi
nativly, porting a simple connection library I had written years ago - I
think it took a grand total of a half hour.
Basically, the native windows calls are based on the berkly sockets library,
os if you'e done any network programming under unix/linux
(socket/connect/send/receive et al), it's a trivial problem to write your
own.
Hope this helps
CAVEAT: I *like* the gnet library, and would love to be using it ..... but
given the interactions, it was easier to do without it than it was gtk.
> Thanks!
>
> Ben
> _______________________________________________
> gnet-dev mailing list
> gnet-dev lists gnetlibrary org
> http://lists.gnetlibrary.org/mailman/listinfo/gnet-dev
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]