7384b4e78eaab44693c985192276e31322155e32Stephan Bosch#define HTTP_CLIENT_CONTINUE_TIMEOUT_MSECS (1000*2)
5257840e8d31a6cb7051703b4cb0931c82aba638Stephan Bosch#define HTTP_CLIENT_DEFAULT_REQUEST_TIMEOUT_MSECS (1000*60*1)
5257840e8d31a6cb7051703b4cb0931c82aba638Stephan Bosch#define HTTP_CLIENT_DEFAULT_DNS_LOOKUP_TIMEOUT_MSECS (1000*10)
fe2b0e3de834dd40b698bb579adc5357d5789ec9Stephan Bosch#define HTTP_CLIENT_DEFAULT_BACKOFF_TIME_MSECS (100)
94d1b08c9e20d637db568a3eab3dfc2b9e96e62aStephan Bosch#define HTTP_CLIENT_DEFAULT_BACKOFF_MAX_TIME_MSECS (1000*60)
1e63e30812158e6446d81cdbb2f45954794d4f8aStephan Bosch#define HTTP_CLIENT_DEFAULT_DNS_TTL_MSECS (1000*60*30)
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan BoschHASH_TABLE_DEFINE_TYPE(http_client_peer_shared,
e48102389fb49deadfc685600dc2e56177fd0d7cStephan BoschHASH_TABLE_DEFINE_TYPE(http_client_host_shared,
e48102389fb49deadfc685600dc2e56177fd0d7cStephan Bosch const char *, struct http_client_host_shared *);
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch unsigned int id; // DEBUG: identify parallel connections
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch struct timeout *to_connect, *to_input, *to_idle, *to_response;
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch /* requests that have been sent, waiting for response */
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch ARRAY_TYPE(http_client_request) request_wait_list;
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen bool connected:1; /* connection is connected */
63a1359e6e7f6b1aebf58eb5d9f8187140ddcb4fStephan Bosch bool tunneling:1; /* last sent request turns this
63a1359e6e7f6b1aebf58eb5d9f8187140ddcb4fStephan Bosch connection into tunnel */
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen bool connect_initialized:1; /* connection was initialized */
bad9931efd293ea9a676ce99e82c539e9d215e0dStephan Bosch bool connect_succeeded:1; /* connection succeeded including SSL */
bad9931efd293ea9a676ce99e82c539e9d215e0dStephan Bosch bool connect_failed:1; /* connection failed */
f17ac27e5989d6b3b3e4f4fb249bef4b06833ab7Stephan Bosch bool lost_prematurely:1; /* lost connection before receiving any data */
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen bool output_locked:1; /* output is locked; no pipelining */
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen bool output_broken:1; /* output is broken; no more requests */
63a1359e6e7f6b1aebf58eb5d9f8187140ddcb4fStephan Bosch bool in_req_callback:1; /* performing request callback (busy) */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch /* connection retry */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch bool no_payload_sync:1; /* expect: 100-continue failed before */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch bool seen_100_response:1;/* expect: 100-continue succeeded before */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch bool allows_pipelining:1;/* peer is known to allow persistent
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch connections */
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Bosch /* all connections to this peer */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch /* pending connections (not ready connecting) */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch ARRAY_TYPE(http_client_connection) pending_conns;
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Bosch /* available connections to this peer */
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Bosch ARRAY_TYPE(http_client_connection) idle_conns;
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch /* distinguishing settings for these connections */
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Bosch bool destroyed:1; /* peer pool is being destroyed */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch struct http_client_peer *shared_prev, *shared_next;
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch struct http_client_peer *client_prev, *client_next;
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch /* queues using this peer */
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch /* active connections to this peer */
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch /* zero time-out for consolidating request handling */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch bool connecting:1; /* peer is waiting to be connected */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch bool connect_backoff:1; /* peer is waiting for backoff timout*/
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen bool disconnected:1; /* peer is already disconnected */
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen bool handling_requests:1;/* currently running request handler */
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch /* current index in host->ips */
1a64096dcbea2765f370c9d35a3480d0e60c643bTimo Sirainen /* the first IP that started the current round of connection attempts.
524d89a40565709964b7ee5e8324a400dc53656bTimo Sirainen initially 0, and later set to the ip index of the last successful
1a64096dcbea2765f370c9d35a3480d0e60c643bTimo Sirainen connected IP */
fc94140acba51adafedafbc8491a3223a51db7a8Stephan Bosch /* peers we are trying to connect to;
fc94140acba51adafedafbc8491a3223a51db7a8Stephan Bosch this can be more than one when soft connect timeouts are enabled */
57d86b6fd46cb6d37bfc28f67ae4be80296ad35aStephan Bosch /* currently active peer */
b66def5dadd3e7c250313a938d26ad113663f86bStephan Bosch /* all requests associated to this queue
b66def5dadd3e7c250313a938d26ad113663f86bStephan Bosch (ordered by earliest timeout first) */
b66def5dadd3e7c250313a938d26ad113663f86bStephan Bosch /* delayed requests waiting to be released after delay */
b66def5dadd3e7c250313a938d26ad113663f86bStephan Bosch ARRAY_TYPE(http_client_request) delayed_requests;
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch /* requests pending in queue to be picked up by connections */
b66def5dadd3e7c250313a938d26ad113663f86bStephan Bosch ARRAY_TYPE(http_client_request) queued_requests, queued_urgent_requests;
b66def5dadd3e7c250313a938d26ad113663f86bStephan Bosch struct timeout *to_connect, *to_request, *to_delayed;
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch /* the ip addresses DNS returned for this host */
e48102389fb49deadfc685600dc2e56177fd0d7cStephan Bosch /* private instance for each client that uses this host */
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch /* active DNS lookup */
c4b2dba355010a38f17b3cd84feb01ecb8b05a55Stephan Bosch /* timeouts */
e48102389fb49deadfc685600dc2e56177fd0d7cStephan Bosch struct http_client_host *shared_prev, *shared_next;
e48102389fb49deadfc685600dc2e56177fd0d7cStephan Bosch struct http_client_host *client_prev, *client_next;
e48102389fb49deadfc685600dc2e56177fd0d7cStephan Bosch /* separate queue for each host port */
fca68889b287d8eed4babe72a231bd6079da012dStephan Bosch /* list of failed requests that are waiting for ioloop */
fca68889b287d8eed4babe72a231bd6079da012dStephan Bosch ARRAY(struct http_client_request *) delayed_failing_requests;
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch HASH_TABLE_TYPE(http_client_peer_shared) peers;
e48102389fb49deadfc685600dc2e56177fd0d7cStephan Bosch HASH_TABLE_TYPE(http_client_host_shared) hosts;
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Bosch * Peer address
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschstatic inline bool
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschhttp_client_peer_addr_is_https(const struct http_client_peer_addr *addr)
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschstatic inline const char *
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschhttp_client_peer_addr_get_https_name(const struct http_client_peer_addr *addr)
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschstatic inline const char *
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschhttp_client_peer_addr2str(const struct http_client_peer_addr *addr)
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Bosch net_ip2addr(&addr->a.tcp.ip), addr->a.tcp.port);
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Bosch net_ip2addr(&addr->a.tcp.ip), addr->a.tcp.port);
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Bosch return t_strdup_printf("unix:%s", addr->a.un.path);
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschstatic inline bool
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschhttp_client_request_to_proxy(const struct http_client_request *req)
7abab3b191860a3d77af5192b0649833c8a0c803Stephan Boschhttp_client_request_label(struct http_client_request *req);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid http_client_request_ref(struct http_client_request *req);
d1f964d3f1dd9c5868b134c4f44dd63f3722eef7Timo Sirainen/* Returns FALSE if unrefing destroyed the request entirely */
d1f964d3f1dd9c5868b134c4f44dd63f3722eef7Timo Sirainenbool http_client_request_unref(struct http_client_request **_req);
79f8a20424633e806447bc9375a5ab403aabc758Stephan Boschvoid http_client_request_destroy(struct http_client_request **_req);
93cc87bb22386e020cee1093b6bd59295e0b33f0Stephan Boschint http_client_request_delay_from_response(struct http_client_request *req,
ede750711f27ca9d9037a7ab9f016411b57f1ad9Stephan Boschvoid http_client_request_get_peer_addr(const struct http_client_request *req,
a62fe4b300e2f591e939993aec4cac1e7ae30ad1Stephan Boschhttp_client_request_get_payload_type(struct http_client_request *req);
99feb6521535a7dc59d8dda89981ceac084b3e88Timo Sirainenint http_client_request_send(struct http_client_request *req,
99feb6521535a7dc59d8dda89981ceac084b3e88Timo Sirainenint http_client_request_send_more(struct http_client_request *req,
6c768e0e1ca2da178e79f7435c32ced01f6bcb24Timo Sirainenbool http_client_request_callback(struct http_client_request *req,
a62fe4b300e2f591e939993aec4cac1e7ae30ad1Stephan Boschvoid http_client_request_connect_callback(struct http_client_request *req,
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid http_client_request_resubmit(struct http_client_request *req);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid http_client_request_retry(struct http_client_request *req,
129596c93692b21d6c6b1313b389774af24c2983Stephan Boschvoid http_client_request_error_delayed(struct http_client_request **_req);
d5c665cf2989d49922b63439ac45714e9755838aTimo Sirainenvoid http_client_request_error(struct http_client_request **req,
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid http_client_request_redirect(struct http_client_request *req,
d1f964d3f1dd9c5868b134c4f44dd63f3722eef7Timo Sirainenvoid http_client_request_finish(struct http_client_request *req);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschstruct connection_list *http_client_connection_list_init(void);
63a1359e6e7f6b1aebf58eb5d9f8187140ddcb4fStephan Boschhttp_client_connection_create(struct http_client_peer *peer);
eb325a5a90c1d2655e74972bde0de6a699d2c864Stephan Boschvoid http_client_connection_ref(struct http_client_connection *conn);
1dead6eacb9302a8419bfc8f4b571ea9a3c00296Timo Sirainen/* Returns FALSE if unrefing destroyed the connection entirely */
1dead6eacb9302a8419bfc8f4b571ea9a3c00296Timo Sirainenbool http_client_connection_unref(struct http_client_connection **_conn);
60381d37ec7213c21bd6ada7babb769f572646f9Stephan Boschvoid http_client_connection_close(struct http_client_connection **_conn);
7691bf6c1c6060fcd1e8d823bf1f80ebd6a784f5Stephan Boschvoid http_client_connection_lost(struct http_client_connection **_conn,
8a6dc50255a27bf887bbd9ed7c3a87bf629d4179Stephan Boschvoid http_client_connection_peer_closed(struct http_client_connection **_conn);
567d1c82e3e59a8e8acc2e1e01228585bab83bc6Stephan Bosch struct http_client_connection *conn, struct http_client_request *req);
753c65234187ca52423e7384796a8b0a2d531591Stephan Boschvoid http_client_connection_handle_output_error(
a4e186e3ef267fc7a6b592788067c8c9c87d0785Stephan Boschint http_client_connection_output(struct http_client_connection *conn);
3d1edb8e3a07d91860cc6b4b3cec8282caa70891Stephan Boschvoid http_client_connection_start_request_timeout(
3d1edb8e3a07d91860cc6b4b3cec8282caa70891Stephan Boschvoid http_client_connection_reset_request_timeout(
3d1edb8e3a07d91860cc6b4b3cec8282caa70891Stephan Boschvoid http_client_connection_stop_request_timeout(
6a33d6385601c89fdaeb437537f714b3a01dcea4Timo Sirainenhttp_client_connection_count_pending(struct http_client_connection *conn);
57c339f4e3404355a8924103317a6158a709ecf1Stephan Boschint http_client_connection_check_ready(struct http_client_connection *conn);
eb325a5a90c1d2655e74972bde0de6a699d2c864Stephan Boschbool http_client_connection_is_idle(struct http_client_connection *conn);
2b9d522a3300fa84a1606e2108a159be7bb36154Stephan Boschbool http_client_connection_is_active(struct http_client_connection *conn);
fc94140acba51adafedafbc8491a3223a51db7a8Stephan Boschint http_client_connection_next_request(struct http_client_connection *conn);
fc94140acba51adafedafbc8491a3223a51db7a8Stephan Boschvoid http_client_connection_check_idle(struct http_client_connection *conn);
7384b4e78eaab44693c985192276e31322155e32Stephan Boschvoid http_client_connection_switch_ioloop(struct http_client_connection *conn);
a62fe4b300e2f591e939993aec4cac1e7ae30ad1Stephan Boschvoid http_client_connection_start_tunnel(struct http_client_connection **_conn,
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschvoid http_client_connection_lost_peer(struct http_client_connection *conn);
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschvoid http_client_connection_claim_idle(struct http_client_connection *conn,
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch (const struct http_client_peer_addr *peer) ATTR_PURE;
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch const struct http_client_peer_addr *peer2) ATTR_PURE;
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Bosch/* connection pool */
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Boschvoid http_client_peer_pool_ref(struct http_client_peer_pool *ppool);
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Boschvoid http_client_peer_pool_unref(struct http_client_peer_pool **_ppool);
20493a543316e8c3acfd8ba4af257ceb658cdfceStephan Boschvoid http_client_peer_pool_close(struct http_client_peer_pool **_ppool);
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch/* peer (shared) */
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschhttp_client_peer_shared_label(struct http_client_peer_shared *pshared);
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschvoid http_client_peer_shared_ref(struct http_client_peer_shared *pshared);
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschvoid http_client_peer_shared_unref(struct http_client_peer_shared **_pshared);
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschvoid http_client_peer_shared_close(struct http_client_peer_shared **_pshared);
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschvoid http_client_peer_shared_switch_ioloop(struct http_client_peer_shared *pshared);
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Boschhttp_client_peer_shared_max_connections(struct http_client_peer_shared *pshared);
63a1359e6e7f6b1aebf58eb5d9f8187140ddcb4fStephan Boschhttp_client_peer_get(struct http_client *client,
ebe0f5e387744621b73c4db79d5891ccbe0a1321Stephan Boschvoid http_client_peer_ref(struct http_client_peer *peer);
ebe0f5e387744621b73c4db79d5891ccbe0a1321Stephan Boschbool http_client_peer_unref(struct http_client_peer **_peer);
ebe0f5e387744621b73c4db79d5891ccbe0a1321Stephan Boschvoid http_client_peer_close(struct http_client_peer **_peer);
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschbool http_client_peer_have_queue(struct http_client_peer *peer,
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschvoid http_client_peer_link_queue(struct http_client_peer *peer,
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschvoid http_client_peer_unlink_queue(struct http_client_peer *peer,
7384b4e78eaab44693c985192276e31322155e32Stephan Bosch http_client_peer_claim_request(struct http_client_peer *peer,
fc94140acba51adafedafbc8491a3223a51db7a8Stephan Boschvoid http_client_peer_trigger_request_handler(struct http_client_peer *peer);
70505f4839520ac67895992621c97d2480c22e7fTimo Sirainenvoid http_client_peer_connection_success(struct http_client_peer *peer);
2a889fc596b12639ac55e657816b8a4f90440f88Timo Sirainenvoid http_client_peer_connection_failure(struct http_client_peer *peer,
2a889fc596b12639ac55e657816b8a4f90440f88Timo Sirainen const char *reason);
f17ac27e5989d6b3b3e4f4fb249bef4b06833ab7Stephan Boschvoid http_client_peer_connection_lost(struct http_client_peer *peer,
fc94140acba51adafedafbc8491a3223a51db7a8Stephan Boschbool http_client_peer_is_connected(struct http_client_peer *peer);
a40a555561b3378c12a986b27f2651c632c8afa4Stephan Boschhttp_client_peer_idle_connections(struct http_client_peer *peer);
66ea898de7face7fc9c275e01e514fa002446975Stephan Boschhttp_client_peer_active_connections(struct http_client_peer *peer);
a40a555561b3378c12a986b27f2651c632c8afa4Stephan Boschhttp_client_peer_pending_connections(struct http_client_peer *peer);
fc94140acba51adafedafbc8491a3223a51db7a8Stephan Boschvoid http_client_peer_switch_ioloop(struct http_client_peer *peer);
8149ed57ae5abbb0c4ccfe88c1d7c58255dc85cfStephan Boschhttp_client_queue_get(struct http_client_host *host,
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschvoid http_client_queue_free(struct http_client_queue *queue);
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschvoid http_client_queue_connection_setup(struct http_client_queue *queue);
1e63e30812158e6446d81cdbb2f45954794d4f8aStephan Boschhttp_client_queue_host_lookup_done(struct http_client_queue *queue);
5791d02c3672f6a525f1fcf0f4f375b4be0ccf4bStephan Bosch struct http_client_queue *queue, const char *error);
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschvoid http_client_queue_submit_request(struct http_client_queue *queue,
63a1359e6e7f6b1aebf58eb5d9f8187140ddcb4fStephan Boschvoid http_client_queue_drop_request(struct http_client_queue *queue,
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschhttp_client_queue_claim_request(struct http_client_queue *queue,
de96afeeaa5242cffe89f1966457e935806b5746Stephan Bosch const struct http_client_peer_addr *addr, bool no_urgent);
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschhttp_client_queue_requests_pending(struct http_client_queue *queue,
c62f15cc134cc9701c391eec8e9ef92105aa6d33Stephan Boschhttp_client_queue_requests_active(struct http_client_queue *queue);
63a1359e6e7f6b1aebf58eb5d9f8187140ddcb4fStephan Boschvoid http_client_queue_connection_success(struct http_client_queue *queue,
e4e4b8544a492cf90bd7a93c9a26e8285fc7c00bStephan Boschvoid http_client_queue_connection_failure(struct http_client_queue *queue,
27a2e59eaa648fef2acb2c4b852567d22e016a2dStephan Bosch struct http_client_peer *peer, const char *reason);
c1423bdba971228a283653222ed0367f84ab6402Stephan Boschvoid http_client_queue_peer_disconnected(struct http_client_queue *queue,
de96afeeaa5242cffe89f1966457e935806b5746Stephan Boschvoid http_client_queue_switch_ioloop(struct http_client_queue *queue);
e48102389fb49deadfc685600dc2e56177fd0d7cStephan Bosch/* host (shared) */
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Boschstatic inline unsigned int
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Boschhttp_client_host_get_ips_count(struct http_client_host *host)
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Boschstatic inline const struct ip_addr *
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Boschhttp_client_host_get_ip(struct http_client_host *host,
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Bosch unsigned int idx)
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Boschstatic inline bool
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Boschhttp_client_host_ready(struct http_client_host *host)
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschhttp_client_host_get(struct http_client *client,
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschvoid http_client_host_free(struct http_client_host **_host);
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschvoid http_client_host_submit_request(struct http_client_host *host,
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschvoid http_client_host_switch_ioloop(struct http_client_host *host);
c4b2dba355010a38f17b3cd84feb01ecb8b05a55Stephan Boschvoid http_client_host_check_idle(struct http_client_host *host);
1e63e30812158e6446d81cdbb2f45954794d4f8aStephan Boschint http_client_host_refresh(struct http_client_host *host);
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Boschbool http_client_host_get_ip_idx(struct http_client_host *host,
23fe024e1dfc8eb5eaefc4e57a16b4257568f510Stephan Bosch const struct ip_addr *ip, unsigned int *idx_r);
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschint http_client_init_ssl_ctx(struct http_client *client,
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Bosch const char **error_r);
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschvoid http_client_delay_request_error(struct http_client *client,
5a37824675033747fcae3fe3fc3c0dd7ef0ca1cdStephan Boschvoid http_client_remove_request_error(struct http_client *client,
9fe6a55877bee691b32c12c7be56242054841670Stephan Bosch * Client shared context