diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-09 14:02:18 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-09 14:02:18 +0000 |
commit | 05d6d354ec99e800007828137315b42be332c719 (patch) | |
tree | 4f357f0795a28202e0e5703506dc1d9069deafa9 /src/libserver/http/http_context.h | |
parent | 4fe64bdcb51eb13b732bfcab0ffb321b16e91395 (diff) | |
download | rspamd-05d6d354ec99e800007828137315b42be332c719.tar.gz rspamd-05d6d354ec99e800007828137315b42be332c719.zip |
[Feature] Allow to skip DNS resolution for keep-alive connections
Diffstat (limited to 'src/libserver/http/http_context.h')
-rw-r--r-- | src/libserver/http/http_context.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/libserver/http/http_context.h b/src/libserver/http/http_context.h index f42164dba..635da7ba5 100644 --- a/src/libserver/http/http_context.h +++ b/src/libserver/http/http_context.h @@ -74,9 +74,23 @@ struct rspamd_http_context *rspamd_http_context_default (void); * @param host * @return */ -struct rspamd_http_connection * -rspamd_http_context_check_keepalive(struct rspamd_http_context *ctx, const rspamd_inet_addr_t *addr, const gchar *host, - bool is_ssl); +struct rspamd_http_connection * rspamd_http_context_check_keepalive(struct rspamd_http_context *ctx, + const rspamd_inet_addr_t *addr, + const gchar *host, + bool is_ssl); + +/** + * Checks if there is a valid keepalive connection + * @param ctx + * @param addr + * @param host + * @param is_ssl + * @return + */ +const rspamd_inet_addr_t *rspamd_http_context_has_keepalive(struct rspamd_http_context *ctx, + const gchar *host, + unsigned port, + bool is_ssl); /** * Prepares keepalive key for a connection by creating a new entry or by reusing existent |