[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()
STINNER Victor added the comment: For UDP, you can use the new asyncio module for that. I agree that the asyncore documentation should mention that datagram protocols (UDP) are not supported. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21531 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21531 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()
Giampaolo Rodola' added the comment: That doesn't surprise me as asyncore does not natively support UDP protocol in the first place. -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21531 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()
Tony Gedge added the comment: If it's true that asyncore doesn't support UDP, I'd suggest at least a statement to this effect in the documentation. As far as I can see, there's nothing to suggest it won't work with UDP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21531 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()
New submission from Tony Gedge: Sending a zero-length UDP packet to asyncore closes socket by default. The default implementation of recv() assumes that zero-length data means close. This isn't true for UDP - it is possible to send a zero-length payload packet. A possible work-around is to overload handle_close() and not call self.close(). However, as handle_close() is called as part of exception handling, we can't determine whether the handle_close() is happening due to a zero-length payload or an exception event. It should be possible to process a zero-length payload UDP packet. -- components: Library (Lib) messages: 218780 nosy: Tony.Gedge priority: normal severity: normal status: open title: Sending a zero-length UDP packet to asyncore invokes handle_close() type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21531 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com