From e4336fe612d4e95cd6fb76b9ced6a9599ebe1990 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 20 Oct 2015 15:24:51 +0100 Subject: Implement batch accept in server. --- utils/rspamd_http_bench.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'utils/rspamd_http_bench.c') 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 +#include #ifdef HAVE_SYS_WAIT_H #include @@ -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); -- cgit v1.2.3