New submission from Kaulkwappe :
socket.setblocking(0)
socket.send(b'a' * 32 * 1024 * 1024)
In the example above socket.send() fails with this error:
Error in connection handler
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/websockets/server.p
Kaulkwappe added the comment:
Sorry for the misunderstanding, here is the complete example:
socket.setblocking(0)
try:
buffer = socket.recv()
if not buffer:
break
except OSError:
bytes_sent = socket.send(b'a' * 32 * 1024 * 1024)
In thi
Kaulkwappe added the comment:
But why does socket.send() throws an exception in this case only when sending a
large amount of bytes? That would mean it is impossible to send large amount of
bytes over SSL sockets as it would fail everytime.
--
status: closed -> o
Kaulkwappe added the comment:
Thank you for your answer Christian. Indeed it seems a little more complex. As
I worked with Non-TLS sockets before it looked like unexpected behaviour to me
as on non-blocking sockets socket.send() would normally return 0 when no data
was sent.
By the way this