aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/tcp_posix.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-16 15:25:00 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-11-16 15:25:00 -0800
commitc586666cbdfc5b5f2a3306892f8b4491862c5aba (patch)
tree924f3f760a489ccf7c6c70307b72d1753aedbdf3 /src/core/lib/iomgr/tcp_posix.c
parent7cdad96fc49090eb5e3a12a7cca5a9f257d3f301 (diff)
parent1dc9ad33273e090a1c7ffa05991dc8ccc2badee6 (diff)
Merge github.com:grpc/grpc into slice_with_exec_ctx
Diffstat (limited to 'src/core/lib/iomgr/tcp_posix.c')
-rw-r--r--src/core/lib/iomgr/tcp_posix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c
index e27a762f20..ba288c768e 100644
--- a/src/core/lib/iomgr/tcp_posix.c
+++ b/src/core/lib/iomgr/tcp_posix.c
@@ -497,6 +497,11 @@ static char *tcp_get_peer(grpc_endpoint *ep) {
return gpr_strdup(tcp->peer_string);
}
+static int tcp_get_fd(grpc_endpoint *ep) {
+ grpc_tcp *tcp = (grpc_tcp *)ep;
+ return tcp->fd;
+}
+
static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) {
grpc_tcp *tcp = (grpc_tcp *)ep;
return grpc_fd_get_workqueue(tcp->em_fd);
@@ -515,7 +520,8 @@ static const grpc_endpoint_vtable vtable = {tcp_read,
tcp_shutdown,
tcp_destroy,
tcp_get_resource_user,
- tcp_get_peer};
+ tcp_get_peer,
+ tcp_get_fd};
grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd,
grpc_resource_quota *resource_quota,