aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/endpoint.h
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-11-30 15:51:25 -0800
committerGravatar Yuchen Zeng <zyc@google.com>2016-11-30 15:51:25 -0800
commitb0023d25dc783ba77164c03a39bb7dcc7e446fe8 (patch)
tree5afae5cf86bc564fa08dcff01b4fdee0f084d438 /src/core/lib/iomgr/endpoint.h
parent19d7bab431d08ae721ffd651926e05320371fff5 (diff)
parent9832b9b2de8ce14dbce90d4cc90336984e8d83c3 (diff)
Merge remote-tracking branch 'upstream/master' into cares_buildin
Diffstat (limited to 'src/core/lib/iomgr/endpoint.h')
-rw-r--r--src/core/lib/iomgr/endpoint.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h
index bf211ca16a..1609b64f2b 100644
--- a/src/core/lib/iomgr/endpoint.h
+++ b/src/core/lib/iomgr/endpoint.h
@@ -61,6 +61,7 @@ struct grpc_endpoint_vtable {
void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep);
grpc_resource_user *(*get_resource_user)(grpc_endpoint *ep);
char *(*get_peer)(grpc_endpoint *ep);
+ int (*get_fd)(grpc_endpoint *ep);
};
/* When data is available on the connection, calls the callback with slices.
@@ -73,6 +74,10 @@ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
char *grpc_endpoint_get_peer(grpc_endpoint *ep);
+/* Get the file descriptor used by \a ep. Return -1 if \a ep is not using an fd.
+ */
+int grpc_endpoint_get_fd(grpc_endpoint *ep);
+
/* Retrieve a reference to the workqueue associated with this endpoint */
grpc_workqueue *grpc_endpoint_get_workqueue(grpc_endpoint *ep);