-
-
Notifications
You must be signed in to change notification settings - Fork 178
Add a sock argument to create_datagram_endpoint() #266
Comments
See PR #267 |
Is this intended to cover listening as a server as well as connecting as a client? I'm not clear on how to use this to get a socket listening. |
(and to test the PR I need both ends) |
You don't connect or listen when using UDP (datagrams); those are TCP (streams) terms. You can send at any time using |
Try looking at examples/udp_echo.py in the asyncio project. |
Ah, thanks. I was failing to combine my understanding of Unix domain socket streams with Internet datagrams. I didn't realise I had to bind the "client" end to something too. I've refactored my code to bind each end to a local name manually (using the Though I have learnt the lesson that I need to bind each client to a path, it does still save serialization/deserialization that I'd have to do on a stream socket. Many thanks for asyncio. It makes so many things trivial again. |
You're welcome. (But are you sure you want to use datagrams for RPC?!?) |
Addressed by commit 1e4ab9f by Chris Laws. |
A number of requests for customization of datagram endpoints would be better served by having a sock argument to create_datagram_endpoint(), similar to create_server() and create_connection(). Example:
http://bugs.python.org/issue25230
http://bugs.python.org/issue23972
The text was updated successfully, but these errors were encountered: