http-client-private.h revision d5c665cf2989d49922b63439ac45714e9755838a
810bf6e564ebef9655fc0ca3b5273fbb6022c098Timo Sirainen#define HTTP_CLIENT_CONTINUE_TIMEOUT_MSECS (1000*2)
810bf6e564ebef9655fc0ca3b5273fbb6022c098Timo Sirainen#define HTTP_CLIENT_DEFAULT_REQUEST_TIMEOUT_MSECS (1000*60*1)
810bf6e564ebef9655fc0ca3b5273fbb6022c098Timo Sirainen#define HTTP_CLIENT_DEFAULT_DNS_LOOKUP_TIMEOUT_MSECS (1000*10)
810bf6e564ebef9655fc0ca3b5273fbb6022c098Timo Sirainen#define HTTP_CLIENT_DEFAULT_BACKOFF_TIME_MSECS (100)
810bf6e564ebef9655fc0ca3b5273fbb6022c098Timo Sirainen#define HTTP_CLIENT_DEFAULT_BACKOFF_MAX_TIME_MSECS (1000*60)
27a44fcfd8d19bffe0f267f20a2b5d3fe7600fddTimo SirainenARRAY_DEFINE_TYPE(http_client_host, struct http_client_host *);
27a44fcfd8d19bffe0f267f20a2b5d3fe7600fddTimo SirainenARRAY_DEFINE_TYPE(http_client_queue, struct http_client_queue *);
8b1ff8af3123607dde63c516e007b47f6519c69aTimo SirainenARRAY_DEFINE_TYPE(http_client_peer, struct http_client_peer *);
b66d803de86bfb411165b3465b0d9ef64ecfe2a1Timo SirainenARRAY_DEFINE_TYPE(http_client_connection, struct http_client_connection *);
b66d803de86bfb411165b3465b0d9ef64ecfe2a1Timo SirainenARRAY_DEFINE_TYPE(http_client_request, struct http_client_request *);
b66d803de86bfb411165b3465b0d9ef64ecfe2a1Timo SirainenHASH_TABLE_DEFINE_TYPE(http_client_host, const char *,
27a44fcfd8d19bffe0f267f20a2b5d3fe7600fddTimo SirainenHASH_TABLE_DEFINE_TYPE(http_client_peer, const struct http_client_peer_addr *,
struct http_client_peer_addr {
} tcp;
const char *path;
} un;
struct http_client_request {
unsigned int refcount;
const char *label;
unsigned int id;
const char *host_socket;
const char *authority;
unsigned int timeout_msecs;
unsigned int attempts;
unsigned int redirects;
unsigned int delayed_error_status;
const char *delayed_error;
void *context;
void (*destroy_callback)(void *);
void *destroy_context;
struct http_client_connection {
unsigned int refcount;
const char *label;
int connect_errno;
struct http_client_peer {
char *addr_name;
unsigned int backoff_time_msecs;
struct http_client_queue {
char *name;
char *addr_name;
unsigned int ips_connect_idx;
unsigned int ips_connect_start_idx;
unsigned int connect_attempts;
struct http_client_host {
char *name;
unsigned int ips_count;
struct http_client {
unsigned int requests_count;
return TRUE;
return FALSE;
return NULL;
i_unreached();
struct http_client_connection *
return t_strconcat
unsigned int http_client_peer_addr_hash
struct http_client_peer *
struct http_client_request *
bool no_urgent);
const char *reason);
struct http_client_queue *
struct http_client_request *
i_unreached();
struct http_client_host *
const char **error_r);