Adjust receiv buffer via setsockopt for udp_server's listening socket.

Since this socket is used for all incoming traffic, its current buffer
1MB is appearantly too small. Change it to 10 MB for now.
pull/13975/head
Dan Zhang 7 years ago
parent 2eb22fd67d
commit 0e50b94b5b
  1. 4
      src/core/lib/iomgr/udp_server.cc

@ -283,8 +283,8 @@ static int prepare_socket(grpc_socket_factory* socket_factory, int fd,
const grpc_resolved_address* addr) { const grpc_resolved_address* addr) {
grpc_resolved_address sockname_temp; grpc_resolved_address sockname_temp;
struct sockaddr* addr_ptr = (struct sockaddr*)addr->addr; struct sockaddr* addr_ptr = (struct sockaddr*)addr->addr;
/* Set send/receive socket buffers to 1 MB */ /* Set send/receive socket buffers to 10 MB */
int buffer_size_bytes = 1024 * 1024; int buffer_size_bytes = 1024 * 1024 * 10;
if (fd < 0) { if (fd < 0) {
goto error; goto error;

Loading…
Cancel
Save