diff options
Diffstat (limited to 'src/libutil/http_private.h')
-rw-r--r-- | src/libutil/http_private.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libutil/http_private.h b/src/libutil/http_private.h index 0f8c847a2..29c6ea45f 100644 --- a/src/libutil/http_private.h +++ b/src/libutil/http_private.h @@ -22,6 +22,7 @@ #include "keypair.h" #include "keypairs_cache.h" #include "ref.h" +#include "khash.h" #define HASH_CASELESS #include "uthash_strcase.h" @@ -76,6 +77,18 @@ struct rspamd_http_message { ref_entry_t ref; }; +struct rspamd_keepalive_hash_key { + rspamd_inet_addr_t *addr; + gchar *host; +}; + +gint32 rspamd_keep_alive_key_hash (struct rspamd_keepalive_hash_key k); +bool rspamd_keep_alive_key_equal (struct rspamd_keepalive_hash_key k1, + struct rspamd_keepalive_hash_key k2); + +KHASH_INIT (rspamd_keep_alive_hash, struct rspamd_keepalive_hash_key, + GQueue, true, rspamd_keep_alive_key_hash, rspamd_keep_alive_key_equal); + struct rspamd_http_context { struct rspamd_http_context_cfg config; struct rspamd_keypair_cache *client_kp_cache; @@ -85,6 +98,7 @@ struct rspamd_http_context { gpointer ssl_ctx_noverify; struct event_base *ev_base; struct event client_rotate_ev; + khash_t (rspamd_keep_alive_hash) *keep_alive_hash; }; #define HTTP_ERROR http_error_quark () |