Bas Wijnen added the comment:
Thank you for your fast response as well.
I overlooked that paragraph indeed. It doesn't mention anything about avoiding
a socket shutdown however. Keeping a list of requests isn't very useful if all
the sockets in the list are closed. ;-)
So I wo
Bas Wijnen added the comment:
For example, I have some programs which are HTTP servers that implement
WebSockets. For regular web page requests, it is acceptable if the connection
is closed after the page is sent. But for a WebSocket it isn't: the whole
point of that protocol is to
Bas Wijnen added the comment:
Alexey: please be more civil.
Antoine: In that case, can you please explain how you would recommend me to
implement my use case, where most of my calls are master-initiated and
blocking, but some slave-initiated events must be non-blocking? Should I make
a lot
Bas Wijnen added the comment:
After trying to use this, I think ssl.pending is a valuable function that
should be supported and documented.
My use case is a half-synchronous system, where I want most calls to block but
asynchronous events are possible as well. Switching the socket between
Bas Wijnen added the comment:
The documentation about non-blocking is clear enough, thank you for pointing it
out.
However, I would ask to write anything in there that contains the word
"pending". The reason is that I didn't find anything in the documentation,
looked in th
New submission from Bas Wijnen:
In order to use ssl sockets asynchronously, it is important to use the
pending() method, otherwise the internal buffer will be ignored, and select may
block for new data while it's already waiting. See bug #16976 and
http://stackoverflow.com/questions/216
New submission from Bas Wijnen :
http://docs.python.org/py3k/library/socketserver.html says:
The solution is to create a separate process or thread to handle each request;
the ForkingMixIn and ThreadingMixIn mix-in classes can be used to support
asynchronous behaviour.
There is another way