Re: [gnet-dev] gnet-win32 message callback



On Thu, 3 May 2001 wroberts1 home com wrote:

> 
> I hate to disturb vacations, but..
> 
> 
> Too bad that GetMessages(&msg, gnet_hWnd, 0, 0) will block forever when the
> message is for gtk, since this callback is always called for gtk messages too.
> 
> The PeekMessage() will never block, so if the message is for gtk, it just
> falls out of gnet dll callback.  I dont know much about win32, but
> that GetMessage() in the IA_NEW_MSG and GET_NAME_MSG handlers might be need
> to get the message out the queue.
gnet's callback should not be called on any gtk events. (No one except
gnet should be posting to gnet_hWnd.) If this is happening, it could be a
bug in gtk or glib. Could you send me a sample program that shows this
problem? I won't be able to investigate until late next week at the
earliest.

 
> On another note..
> Another thing i observed is that I cant have more than 20 sockets open.
> I have one udp socket, and 24 tcp sockets each on a different source port.
> Binding the last five tcp will fail.  However, when I limit my
> application to 16 its fine.  I have no such troubles on linux.
That is odd. I will look into that. Do you have a sample program that
your can send me?

Andy
 
> 
> On Thu, May 03, 2001 at 06:46:34PM -0400, Andrew J Lanoix wrote:
> > 
> > That may work but the correct way is explained here:
> > http://www.gnetlibrary.org/pipermail/gnet-dev/2001-April/000016.html
> > 
> > Andy (still on vacation)
> > 
> > On Thu, 3 May 2001 wroberts1 home com wrote:
> > 
> > > 
> > > Apparently some messages for gtk will pass thru iochannel watch created
> > > buy gnet-win32 dll.  The gnet_MainCallBack() also gets called for gtk
> > > messages.  GetMessages() will swallow these messages and gtk events
> > > will be lost.  So i replaced it with:
> > >     PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
> > > 
> > > With this, the messages not meant for gnet are ignored, but not absorbed.
> > > 
> > > The messages I saw absorbed were for gtk button press/released and
> > > mouse leave/enter.
> > > 
> > > _______________________________________________
> > > gnet-dev mailing list
> > > gnet-dev gnetlibrary org
> > > http://www.gnetlibrary.org/mailman/listinfo/gnet-dev
> > > 
> > 
> > _______________________________________________
> > gnet-dev mailing list
> > gnet-dev gnetlibrary org
> > http://www.gnetlibrary.org/mailman/listinfo/gnet-dev
> > 
> 




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