Add FFI bindings for blocking network transfers via libcurl's easy interface#665
Draft
rdw-software wants to merge 15 commits intomainfrom
Draft
Add FFI bindings for blocking network transfers via libcurl's easy interface#665rdw-software wants to merge 15 commits intomainfrom
rdw-software wants to merge 15 commits intomainfrom
Conversation
0ce6ce4 to
1dfcfbe
Compare
0f209a1 to
ff44dbb
Compare
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.
Status: TBD (don't remember)
TODOs:
First part of binding the blocking client APIs from libcurl. There's a few ugly parts that won't map cleanly:
curl_easy_setopt_by_namereplacingcurl_easy_setoptThe plan is to export a custom wrapper API instead of the one that curl offers to set transfer options:
curl_easyoptionpointer and handle the restIf
curl_easy_setoptisn't going to be exposed, the name can be reused. Otherwise, it could get an alias.curl_easy_getinfo_by_namepotentially replacingcurl_easy_getinfo(?)I'd rather not duplicate
CURLINFOeven though it's not as problematic. Maybe another name-based lookup function will do? In that case, there's probably no need to deal with numeric IDs. I'll need to do some more testing first.curl_easy_ssls_exportand other callback-based APIsCallbacks really aren't something I like to see, but they just won't die. Unlike the VM, when JIT optimizations aren't disabled. It won't be an issue for curl's easy interface because it's blocking. But for parallel transfers (multi interface) and the libuv integration, there might not be any way around implementing another event/polling wrapper API. Not great?
NYI: Async DNS resolution
The blocking transfer APIs aren't going to break any speed records. So it shouldn't be a problem if DNS resolution uses the default mechanism. On Windows, it seems like
AsynchResolveris actually enabled by default... lucky accident.Resolves #655 (once done). Still needs testing for at least the most basic use cases, and name-based lookups.