diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-20 15:24:51 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-20 15:24:51 +0100 |
commit | e4336fe612d4e95cd6fb76b9ced6a9599ebe1990 (patch) | |
tree | 0245846748ce51a179178bf77a3452842c39f62b /utils/rspamd_http_bench.c | |
parent | afc786bb1ca868077219b133d7611b71957b0b44 (diff) | |
download | rspamd-e4336fe612d4e95cd6fb76b9ced6a9599ebe1990.tar.gz rspamd-e4336fe612d4e95cd6fb76b9ced6a9599ebe1990.zip |
Implement batch accept in server.
Diffstat (limited to 'utils/rspamd_http_bench.c')
-rw-r--r-- | utils/rspamd_http_bench.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/rspamd_http_bench.c b/utils/rspamd_http_bench.c index 286a3ddb1..f30c2bfe6 100644 --- a/utils/rspamd_http_bench.c +++ b/utils/rspamd_http_bench.c @@ -30,6 +30,7 @@ #include "cryptobox.h" #include "unix-std.h" #include <math.h> +#include <netinet/tcp.h> #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> @@ -124,10 +125,12 @@ rspamd_http_client_func (struct event_base *ev_base, double *latency) struct rspamd_http_connection *conn; gchar urlbuf[PATH_MAX]; struct client_cbdata *cb; - gint fd; + gint fd, flags; g_assert ( (fd = rspamd_inet_address_connect (addr, SOCK_STREAM, TRUE)) != -1); + flags = 1; + setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof (flags)); conn = rspamd_http_connection_new (rspamd_client_body, rspamd_client_err, rspamd_client_finish, RSPAMD_HTTP_CLIENT_SIMPLE, RSPAMD_HTTP_CLIENT, c); |