[Python-Dev] SSLSocket.send() for non-blocking sockets (original) (raw)
Nikolaus Rath Nikolaus at rath.org
Wed Mar 26 01:54:09 CET 2014
- Previous message: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3
- Next message: [Python-Dev] SSLSocket.send() for non-blocking sockets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I'd like to hear some more opinions on http://bugs.python.org/issue20951. I think the possible courses of action are:
Document the current behavior.
This has the drawback that (a) it still remains rather counterintuitive, and (b) one still needs extra code to distinguish between a zero-return because the write would block, and a zero-return because the peer has closed the connection.
I'm not sure about the best way to do this check. I would probably try to run select() on the underlying raw socket. Is there a better way?
Change the behavior immediately, potentially breaking some applications that worked around it, but unbreaking others that relied on the documented behavior.
Deprecate the current behavior, and introduce a transition period where the new behavior is controlled by a flag.
Drawbacks: no direct breakage of anything, but additional complexity may indirectly cause bugs.
Thoughts?
Best, -Nikolaus
-- Encrypted emails preferred. PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
»Time flies like an arrow, fruit flies like a Banana.«
- Previous message: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3
- Next message: [Python-Dev] SSLSocket.send() for non-blocking sockets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]