Skip to content

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

Closed
basak mannequin opened this issue Sep 24, 2015 · 4 comments
Closed

asyncio/Windows: Unix datagram sockets not supported #69417

basak mannequin opened this issue Sep 24, 2015 · 4 comments
Labels
topic-asyncio type-feature A feature request or enhancement

Comments

@basak
Copy link
Mannequin

basak mannequin commented Sep 24, 2015

BPO 25230
Nosy @gvanrossum, @vstinner, @basak, @asvetlov, @1st1

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:

assignee = None
closed_at = <Date 2022-03-12.17:03:15.946>
created_at = <Date 2015-09-24.22:14:21.840>
labels = ['type-feature', 'expert-asyncio']
title = 'asyncio/Windows: Unix datagram sockets not supported'
updated_at = <Date 2022-03-12.17:03:15.945>
user = 'https://github.com/basak'

bugs.python.org fields:

activity = <Date 2022-03-12.17:03:15.945>
actor = 'asvetlov'
assignee = 'none'
closed = True
closed_date = <Date 2022-03-12.17:03:15.946>
closer = 'asvetlov'
components = ['asyncio']
creation = <Date 2015-09-24.22:14:21.840>
creator = 'rb'
dependencies = []
files = []
hgrepos = []
issue_num = 25230
keywords = []
message_count = 4.0
messages = ['251549', '251551', '251589', '415001']
nosy_count = 5.0
nosy_names = ['gvanrossum', 'vstinner', 'rb', 'asvetlov', 'yselivanov']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue25230'
versions = ['Python 3.4']

@basak
Copy link
Mannequin Author

basak mannequin commented Sep 24, 2015

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.

@basak basak mannequin added topic-asyncio type-feature A feature request or enhancement labels Sep 24, 2015
@gvanrossum
Copy link
Member

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

@gvanrossum
Copy link
Member

See python/asyncio#267. Can you patch that in and see if you can make it work?

@vstinner vstinner changed the title Unix datagram sockets not supported asyncio/Windows: Unix datagram sockets not supported Oct 12, 2015
@asvetlov
Copy link
Contributor

Implemented a long time ago, closing

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
bxsx added a commit to bxsx/cpython that referenced this issue Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-asyncio type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants