[Stackless] stackless socket, curiouser and curiouser

Richard Tew richard.m.tew at gmail.com
Wed Feb 28 19:26:53 CET 2007

On 2/28/07, Paul Sijben <sijben at eemvalley.com> wrote:
> on a hunch I changed handle_accept() in stacklesssocket to:
>     def handle_connect(self):
>         #self.connectChannel.send(None)
>         pass
> because it expects connect to receive it in
>     def connect(self, address):
>         asyncore.dispatcher.connect(self, address)
>         if not self.connected:
>             self.connectChannel.receive()
> however a UDP socket is connectionless. At the monment  am happy with
> the change. I managed to send/receive my first pair of packets.

I have checked in changes to the module in SVN to do this for UDP
sockets (well DGRAM).  Thanks! :-)

> I must say that so far the project of moving my code to stackless is not
> as straightforward as I'd hoped.

Yes, unfortunately it isn't really the place of Stackless to provide the
support which can enable people to use sockets synchronously within

It is possible that stacklesssocket can provide what you need but
it may take some additional work.  I would certainly appreciate the
chance to flesh out stacklesssocket.

If it is more important to you to just get things done, you might be
better off to look at using a networking framework which is known to
work with Stackless.  I do not have any personal knowledge of any
which do so without some other form of shenanigans involved.  However
there are some people on the list with experience mixing Stackless
with Twisted who might wish to help out if you choose to go that

I will be checking in some Twisted/Stackless examples into SVN.


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list