-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
asyncio/Windows: Unix datagram sockets not supported #69417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
AF_UNIX, SOCK_DGRAM sockets are valid, but asyncio doesn't appear to support them. I've tried combinations of create_connection, create_datagram_endpoint and create_unix_connection, creating a socket myself and passing in sock, and equivalent methods at the server end. There seem to be implicit assumptions about addresses being 2-tuples (instead of strings) and transports being hardcoded to be constructed as either stream or datagram transports. create_unix_connection makes the assumption that it will be a stream, and create_datagram_endpoint that it will be AF_INET or AF_INET6 with (host, port) addressing. I used 3.4.3, but looking at the docs it doesn't look like this was addressed in 3.5 either. I'd like this because message boundaries are preserved (unlike in SOCK_STREAM), which if it Just Worked would make local system IPC (eg. with JSON-RPC) extremely trivial to implement in asyncio. |
The simplest fix for this IMO is to add a sock parameter to create_datagram_endpoint(). I've filed an issue for this in the upstream asyncio project: python/asyncio#266 |
See python/asyncio#267. Can you patch that in and see if you can make it work? |
Implemented a long time ago, closing |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: