Skip to content
Snippets Groups Projects
Commit 3600b073 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

daemon/io: use recvmmsg for master sockets, recvmsg otherwise

this applies for Linux with recvmmsg() support only
parent 8f9faa26
Branches
Tags
No related merge requests found
......@@ -41,7 +41,11 @@ static void handle_getbuf(uv_handle_t* handle, size_t suggested_size, uv_buf_t*
uv_loop_t *loop = handle->loop;
struct worker_ctx *worker = loop->data;
buf->base = (char *)worker->wire_buf;
buf->len = sizeof(worker->wire_buf);
/* Use recvmmsg() on master sockets if possible. */
if (handle->data)
buf->len = suggested_size;
else
buf->len = sizeof(worker->wire_buf);
}
void udp_recv(uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment