On Tue, 21 Nov 2000, James Henstridge wrote:

> Use the input_add function.  It should do what you want.

OK, it works perfectly under linux. However, I'm having troubles when I
test the code under WinNT. I get the following assertion failure printouts
on the console, and of course, the socket does not respond afterwards. 

GLib-WARNING **: 220 isn't a (emulated) file descriptor

GLib-CRITICAL **: file giochannel.c: line 115 (g_io_add_watch_full):
assertion `
channel != NULL' failed

GLib-CRITICAL **: file giochannel.c: line 60 (g_io_channel_unref):
assertion `ch
annel != NULL' failed

The code is the following:

    def setup_local_soap_server(self,port,handler_class):
        import socket
        self.soap_port = port
        self.handler_class = handler_class
        self.soap_socket = socket.socket(socket.AF_INET,
                                         socket.SOCK_STREAM)
        self.soap_socket.setsockopt(socket.SOL_SOCKET,
                                    socket.SO_REUSEADDR,1)
        self.soap_socket.bind(('',port))
        self.soap_socket.listen(5)
        from gtk import input_add
        import GDK
        input_add(self.soap_socket,GDK.INPUT_READ,
                  self.handle_incoming_soap_request)

Maybe ther's a problem in the pygtk win32 port, or in the gtk win32 port
itself. Any help on where to look for the bug would be precious.

Thanks 

Alexandre Fayolle
-- 
http://www.logilab.com 
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to