Skip to content

Commit

Permalink
net_http refactor (#17460)
Browse files Browse the repository at this point in the history
* net_http: refactor net_http_new

The goal is to move calls to getaddrinfo() and connect() into
net_http_update(). This will make it possible for them to be replaced
with non-blocking alternatives later.

The net_http calling pattern right now allows callers to create the
http_connection_t, call net_http_new() which creates the http_t from
the http_connection_t, free the http_connection_t, and then start
calling net_http_update(). In order to preserve that, the http_t needs
to copy the values out of the http_connection_t on create. This also
preserves the http_connection_t values instead of freeing them, so the
connection would be able to be used later.

* net_http: implement dns cache

* net_http: separate out address resolution, connect, and request send

* net_http: perform getaddrinfo on separate thread

* net_http: implement basic connection pool

* net_http: refactor receive calls to read faster, do fewer reallocs

* net_http: build fix for platforms without SSL

* net_http: build fix for non-griffin builds

* net_http: build fix for non-threaded platforms
  • Loading branch information
warmenhoven authored Jan 23, 2025
1 parent 14a28b8 commit d2eb49c
Showing 1 changed file with 922 additions and 528 deletions.
Loading

0 comments on commit d2eb49c

Please sign in to comment.