search for: raw_send_socket

Displaying 10 results from an estimated 10 matches for "raw_send_socket".

2023 Feb 23
1
[nbdkit PATCH] server: Don't assert on send if client hangs up early
...t error nbdkit: pattern.3: debug: error-inject: pread count=262144 offset=4980736 nbdkit: pattern.3: debug: pattern: pread count=262144 offset=4980736 nbdkit: pattern.4: error: write data: NBD_CMD_READ: Broken pipe nbdkit: pattern.4: debug: exiting worker thread pattern.4 nbdkit: connections.c:402: raw_send_socket: Assertion `sock >= 0' failed. When there are multiple queued requests, and the client hangs up abruptly as soon as the first error response is seen (rather than waiting until all other queued responses are flushed then sending NBD_CMD_DISC), another thread that has a queued response ready...
2019 Jun 07
4
[nbdkit PATCH v2 0/2] Reduce network overhead with MSG_MORE/corking
This time around, the numbers are indeed looking better than in v1; and I like the interface better. Eric Blake (2): server: Prefer send() over write() server: Group related transmission send()s server/internal.h | 7 +++- server/connections.c | 51 +++++++++++++++++++++++++--- server/crypto.c | 11 ++++--
2019 Jun 07
0
[nbdkit PATCH v2 2/2] server: Group related transmission send()s
...conn) } /* Write buffer to conn->sockout with send() and either succeed completely - * (returns 0) or fail (returns -1). flags is ignored for now. + * (returns 0) or fail (returns -1). flags may include SEND_MORE as a hint + * that this send will be followed by related data. */ static int raw_send_socket (struct connection *conn, const void *vbuf, size_t len, @@ -339,9 +340,14 @@ raw_send_socket (struct connection *conn, const void *vbuf, size_t len, int sock = conn->sockout; const char *buf = vbuf; ssize_t r; + int f = 0; +#ifdef MSG_MORE + if (flags & SEND_MORE) + f |= MSG_M...
2020 Feb 12
0
[PATCH nbdkit 2/3] server: Rename ‘struct b_conn_handle’ to plain ‘struct handle’.
...handle *h = get_handle (conn, b->i); int r; assert (h->handle && (h->state & HANDLE_CONNECTED)); diff --git a/server/connections.c b/server/connections.c index 7e9584b3..d4cdf994 100644 --- a/server/connections.c +++ b/server/connections.c @@ -58,15 +58,6 @@ static int raw_send_socket (const void *buf, size_t len, int flags); static int raw_send_other (const void *buf, size_t len, int flags); static void raw_close (void); -void * -connection_get_handle (size_t i) -{ - GET_CONN; - - assert (i < conn->nr_handles); - return conn->handles[i].handle; -} - int connec...
2020 Feb 11
0
[PATCH nbdkit 3/3] server: Remove explicit connection parameter, use TLS instead.
...23 +53,24 @@ static struct connection *new_connection (int sockin, int sockout, 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_socket (struct connection *, const void *buf, size_t len, - int flags); -static int raw_send_other (struct connection *, const void *buf, size_t len, - int flags); -static void raw_close (struct connection *); +static int raw_recv ( void *buf, size_t le...
2020 Feb 11
4
[PATCH nbdkit v2 0/3] server: Remove explicit connection parameter.
v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00081.html v2 replaces struct connection *conn = GET_CONN; with GET_CONN; which sets conn implicitly and asserts that it is non-NULL. If we actually want to test if conn is non-NULL or behave differently, then you must use threadlocal_get_conn() instead, and some existing uses do that. Rich.
2020 Feb 11
5
[PATCH nbdkit 0/3] server: Remove explicit connection parameter.
The third patch is a large but mechanical change which gets rid of passing around struct connection * entirely within the server, preferring instead to reference the connection through thread-local storage. I hope this is a gateway to simplifying other parts of the code. Rich.
2020 Feb 12
5
[PATCH nbdkit 1/3] server: Rename global backend pointer to "top".
It's confusing to use the same terminology for a single backend as for the linked list of backends. In particular it's often not clear if we're calling the next backend or the whole chain of backends. --- server/internal.h | 14 ++++++++++-- server/connections.c | 20 ++++++++--------- server/locks.c | 2 +- server/main.c
2020 Aug 18
15
[PATCH nbdkit 0/9] Port to Windows.
Also available here: https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw This is the port to Windows using native Windows APIs (not MSYS or Cygwin). This patch series is at the point where it basically now works. I can run the server with the memory plugin, and access it remotely using guestfish, creating filesystems and so on without any apparent problems. Nevertheless there are many
2020 Aug 20
15
[PATCH nbdkit 0/13] Port to Windows without using a separate library.
Also available here: https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib After a lot of work I have made the port to Windows work without using a separate library. Instead, on Windows only, we build an "import library" (library of stubs) which resolves references to nbdkit_* functions in the main program and fixes up the plugin, basically the first technique outlined in