On Thu, 26 Feb 2015 16:52:52 +0100
Victor Stinner victor.stin...@gmail.com
wrote:
2015-02-26 16:49 GMT+01:00 Antoine Pitrou solip...@pitrou.net:
What is your use case?
See the code at the end of my message:
while True:
data, addr = sock.recvfrom()
...
I expect a similar
On Thu, 26 Feb 2015 14:37:34 +0100
Victor Stinner victor.stin...@gmail.com
wrote:
I see different options to write sequential UDP code:
The thing is, sequential UDP code doesn't really mean anything...
What is your use case?
- add stream classes like asyncio.open_connection() for TCP (may
2015-02-26 16:49 GMT+01:00 Antoine Pitrou solip...@pitrou.net:
What is your use case?
See the code at the end of my message:
while True:
data, addr = sock.recvfrom()
...
I expect a similar syntax using asyncio:
while True:
data, addr = yield from sock.recvfrom()
...
Victor
I didn't follow all of that, but sendto() exists on the selector loop. You
should ignore errors from it, since it's just as likely that the kernel
accepts the packet (so sendto() succeeds) but some other layer or router
drops it. There's absolutely no point in buffering and retrying based on
the