search for: crypto_cork

Displaying 2 results from an estimated 2 matches for "crypto_cork".

2019 Jun 06
0
[nbdkit PATCH 1/2] server: Add support for corking
...0644 --- a/server/crypto.c +++ b/server/crypto.c @@ -371,6 +371,24 @@ crypto_send (struct connection *conn, const void *vbuf, size_t len) return 0; } +/* Change the cork status to batch a group of send calls, and either succeed + * completely (returns 0) or fail (returns -1). + */ +static int +crypto_cork (struct connection *conn, bool cork) +{ + gnutls_session_t session = conn->crypto_session; + + assert (session != NULL); + + if (cork) + gnutls_record_cork (session); + else if (gnutls_record_uncork (session, GNUTLS_RECORD_WAIT) < 0) + return -1; + + return 0; +} + /* There's...
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