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 
blocking and non-blocking all the time is annoying and results in code that is 
harder to read.

With ssl.pending, I can simply repeat the read as long as data is pending.  
Setting my buffer size high might technically work, but that seems too fragile. 
 I don't like using an undocumented function either, but I'm hoping that gets 
fixed. ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21430>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to