-
Notifications
You must be signed in to change notification settings - Fork 146
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
Using "recvmsg" with anyio #201
Comments
Yeah, You mention passing file descriptors, but that's only possible with UNIX sockets, not TCP. What gives? |
Nothing gives, I was lazy and used a TCP example to illustrate the problem because I had that lying around. WRT asyncio one might expect that calling |
Supporting |
Would it be enough for it to be part of the 3.0 release? I don't really want to add any more features to the 2.x branch. |
Sure, no problem. The code I'm adapting is going to rely on 3.0's sync-calling features anyway. |
Need to use raw sockets, because the readiness checks fail, because asyncio is stupid. agronholm/anyio#201
I can probably support the narrow use case of sending and receiving a bunch of file descriptors over UNIX sockets, but general recvmsg support in SocketStream is a no-go. |
Oh boy. Turns out I have to completely abandon the existing asyncio |
Whew, that was a load of work. A new proof-of-concept UNIX socket stream and listener have been successfully tested. |
The test suite now passes with the new |
A heap of thanks for doing that work. |
…cket stream Closes #201. Problem: only "pseudo" sockets come out of uvloop, can't use sendmsg()!
Using
wait_socket_readable
fails when using asyncio.Seems that asyncio decides to add a socket reader as soon as the socket is opened – which causes
BaseSelectorEventLoop._ensure_fd_no_transport
to go splat when I try to check for readability.This test program succeeds with trio, but not with asyncio:
I'm doing this because depending on the options it's called with, the library I'm anyio-izing may need to pass file descriptors along.
The text was updated successfully, but these errors were encountered: