Add read & write process_fd functions#245
Merged
saghul merged 2 commits intosaghul:masterfrom Jul 19, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So recently I actually started to write my own cython version of this library and in doing so I came up with an idea to make it easier to use the socket callbacks. So instead of users needing to use
ARES_SOCKET_BADI made 2 functions that can be used to either process either a read or write file descriptor only. I'll be adding these changes to a future pull request to aiodns since the other reviewers didn't like that I accidently messed around with coverage. (I need to remember to close that pull request and open a new one if these changes get accepted and later updated)Basically having these should allow users using an event loop to do something like this, this is what I wrote for my version of c-ares and I wanted aiodns to do the same with this library so that ARES_SOCKET_BAD doesn't have to be passed through to the different callbacks.
If you think I should add in sphinx doc strings to this library as well I would be happy to do so.