search for: tls_send

Displaying 6 results from an estimated 6 matches for "tls_send".

2019 Jun 06
1
[libnbd PATCH] tls: Check for pending bytes in gnutls buffers
...t;sock); + if (h->sock->ops->pending && h->sock->ops->pending (h->sock)) + SET_NEXT_STATE (%REPLY.START); + } return 0; DEAD: diff --git a/lib/crypto.c b/lib/crypto.c index 3f7c744..e0f173f 100644 --- a/lib/crypto.c +++ b/lib/crypto.c @@ -181,6 +181,12 @@ tls_send (struct nbd_handle *h, return r; } +static bool +tls_pending (struct socket *sock) +{ + return gnutls_record_check_pending (sock->u.tls.session) > 0; +} + static int tls_get_fd (struct socket *sock) { @@ -209,6 +215,7 @@ tls_close (struct socket *sock) static struct socket_ops crypt...
2019 Jun 03
0
[PATCH libnbd discussion only 3/5] lib: Pass handle to socket recv and send calls.
...har *filename) #ifdef HAVE_GNUTLS static ssize_t -tls_recv (struct socket *sock, void *buf, size_t len) +tls_recv (struct nbd_handle *h, struct socket *sock, void *buf, size_t len) { ssize_t r; @@ -163,7 +163,8 @@ tls_recv (struct socket *sock, void *buf, size_t len) } static ssize_t -tls_send (struct socket *sock, const void *buf, size_t len) +tls_send (struct nbd_handle *h, + struct socket *sock, const void *buf, size_t len) { ssize_t r; diff --git a/lib/internal.h b/lib/internal.h index 73cb3f9..c8e5094 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -188,8 +188,10...
2019 Jun 08
0
[PATCH libnbd 1/3] lib: socket: Add .send flags parameter.
...N || errno == EWOULDBLOCK) return 1; /* more data */ diff --git a/lib/crypto.c b/lib/crypto.c index e0f173f..703bc84 100644 --- a/lib/crypto.c +++ b/lib/crypto.c @@ -164,7 +164,7 @@ tls_recv (struct nbd_handle *h, struct socket *sock, void *buf, size_t len) static ssize_t tls_send (struct nbd_handle *h, - struct socket *sock, const void *buf, size_t len) + struct socket *sock, const void *buf, size_t len, int flags) { ssize_t r; diff --git a/lib/internal.h b/lib/internal.h index 503bf34..1ffb5b7 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -201...
2019 Jun 08
6
[PATCH libnbd 0/3] states: Use MSG_MORE to coalesce messages.
Appears to have a measurable benefit, see 3/3 for test results. Rich.
2020 Mar 30
4
[libnbd PATCH 0/2] fix hangs against nbdkit 1.2
nbdkit 1.2 as a server waits for read() to see EOF, even after the client has sent NBD_CMD_DISC. That was fixed in mbdkit 1.4; and most modern NBD servers are smarter than this (they close() the write end of their traffic soon after NBD_CMD_DISC). But it's easy enough to revert nbdkit commit c70616f8 to get back to a server with the same behavior as the older nbdkit, at which point both
2019 Jun 03
10
[PATCH libnbd discussion only 0/5] api: Implement concurrent writer.
This works, but there's no time saving and I'm still investigating whether it does what I think it does. Nevertheless I thought I would post it because it (probably) implements the idea I had last night outlined in: https://www.redhat.com/archives/libguestfs/2019-June/msg00010.html The meat of the change is patch 4. Patch 5 is an example which I would probably fold into patch 4 for