David Siroky <sir...@dasir.cz> added the comment:

Sorry, I attached wrong example version. It uses repeated sslsock.write() of 
the same buffer after catching SSL_ERROR_WANT_WRITE. It delivers the full block 
but this is a blocking operation.

I'm troubled with non-blocking writes. But as I dig deeper into the problem it 
looks like an inconsistency in OpenSSL (Linux vs. MSW). In Linux 
sslsock.write() always (as far as I can tell) sends some or all of the data and 
returns the amount. Like the plain socket.send(). In Windows it raises an 
exception if the data is larger then some uncertain size (mostly 16kB).

I'm working on snakeMQ asynchronous messaging library where the "packeter" 
layer relies on the sock.send() returning actual amount of sent bytes. This is 
not working in Windows if the link uses SSL.

Tested on WinXP, py2.6, py3.2.

----------
Added file: http://bugs.python.org/file22280/ssl_sock_test_fix.py

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

Reply via email to