This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年05月19日 03:28 by Tony.Gedge, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg218780 - (view) | Author: Tony Gedge (Tony.Gedge) | Date: 2014年05月19日 03:28 | |
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. |
|||
| msg218799 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2014年05月19日 16:11 | |
That doesn't surprise me as asyncore does not natively support UDP protocol in the first place. |
|||
| msg218828 - (view) | Author: Tony Gedge (Tony.Gedge) | Date: 2014年05月20日 01:37 | |
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. |
|||
| msg221749 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年06月27日 22:31 | |
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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:03 | admin | set | github: 65730 |
| 2021年10月21日 11:23:10 | iritkatriel | set | status: open -> closed superseder: Close asyncore/asynchat/smtpd issues and list them here resolution: wont fix stage: resolved |
| 2021年05月28日 22:54:56 | iritkatriel | set | title: Sending a zero-length UDP packet to asyncore invokes handle_close() -> doc: asyncore does not support UDP nosy: + docs@python assignee: docs@python versions: + Python 3.9, Python 3.10, Python 3.11, - Python 2.7 components: + Documentation keywords: + easy |
| 2014年06月27日 22:31:14 | vstinner | set | nosy:
+ vstinner messages: + msg221749 |
| 2014年05月20日 01:37:47 | Tony.Gedge | set | messages: + msg218828 |
| 2014年05月19日 16:11:00 | giampaolo.rodola | set | nosy:
+ giampaolo.rodola messages: + msg218799 |
| 2014年05月19日 15:52:39 | santoso.wijaya | set | nosy:
+ santoso.wijaya |
| 2014年05月19日 03:28:21 | Tony.Gedge | create | |