aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/tcp_posix.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-03-28 09:50:33 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-03-28 09:50:33 -0700
commit547cb4b283273a68c61da28f97b149b8c55c8daf (patch)
tree357f42fab4d8c14ae1838084f8589a19c4bc7018 /src/core/lib/iomgr/tcp_posix.h
parent5b9792a75f620011599548ca26989509b71b98cb (diff)
Make chunk sizes configurable, push channel args down a little deeper
Diffstat (limited to 'src/core/lib/iomgr/tcp_posix.h')
-rw-r--r--src/core/lib/iomgr/tcp_posix.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/tcp_posix.h b/src/core/lib/iomgr/tcp_posix.h
index 1c0d13f96e..3bf93dfcf8 100644
--- a/src/core/lib/iomgr/tcp_posix.h
+++ b/src/core/lib/iomgr/tcp_posix.h
@@ -49,12 +49,21 @@
#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
+/* Channel arg (integer) setting how large a slice to try and read from the wire
+ each time recvmsg (or equivalent) is called */
+#define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size"
+#define GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE \
+ "grpc.experimental.tcp_min_read_chunk_size"
+#define GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE \
+ "grpc.experimental.tcp_max_read_chunk_size"
+
extern int grpc_tcp_trace;
/* Create a tcp endpoint given a file desciptor and a read slice size.
Takes ownership of fd. */
-grpc_endpoint *grpc_tcp_create(grpc_fd *fd, grpc_resource_quota *resource_quota,
- size_t read_slice_size, const char *peer_string);
+grpc_endpoint *grpc_tcp_create(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
+ const grpc_channel_args *args,
+ const char *peer_string);
/* Return the tcp endpoint's fd, or -1 if this is not available. Does not
release the fd.