search for: raw_cork

Displaying 3 results from an estimated 3 matches for "raw_cork".

2019 Jun 06
0
[nbdkit PATCH 1/2] server: Add support for corking
...+53,7 @@ static void free_connection (struct connection *conn); /* Don't call these raw socket functions directly. Use conn->recv etc. */ static int raw_recv (struct connection *, void *buf, size_t len); static int raw_send (struct connection *, const void *buf, size_t len); +static int raw_cork (struct connection *conn, bool cork); static void raw_close (struct connection *); int @@ -288,6 +291,15 @@ new_connection (int sockin, int sockout, int nworkers) conn->send = raw_send; conn->close = raw_close; + /* Install a cork handler, but only if corking works */ +#ifdef TCP_C...
2019 Jun 06
4
[nbdkit PATCH 0/2] Reduce network overhead with corking
Slightly RFC, as I need more time to investigate why Unix sockets appeared to degrade with this patch. But as TCP sockets (over loopback to localhost) and TLS sessions (regardless of underlying Unix or TCP) both showed improvements, this looks like a worthwhile series. Eric Blake (2): server: Add support for corking server: Cork around grouped transmission send()s server/internal.h | 3
2019 Jun 06
0
[nbdkit PATCH 2/2] server: Cork around grouped transmission send()s
...c +++ b/server/connections.c @@ -356,6 +356,7 @@ raw_send (struct connection *conn, const void *vbuf, size_t len) return 0; } +#ifdef TCP_CORK /* Change the cork status to batch a group of send calls, and either succeed * completely (returns 0) or fail (returns -1). */ @@ -368,6 +369,7 @@ raw_cork (struct connection *conn, bool cork) setsockopt (conn->sockout, IPPROTO_TCP, TCP_CORK, &opt, sizeof opt); return 0; } +#endif /* TCP_CORK */ /* Read buffer from conn->sockin and either succeed completely * (returns > 0), read an EOF (returns 0), or fail (returns -1). diff --...