diff options
author | 2016-11-30 15:51:25 -0800 | |
---|---|---|
committer | 2016-11-30 15:51:25 -0800 | |
commit | b0023d25dc783ba77164c03a39bb7dcc7e446fe8 (patch) | |
tree | 5afae5cf86bc564fa08dcff01b4fdee0f084d438 /src/core/lib/iomgr/endpoint.h | |
parent | 19d7bab431d08ae721ffd651926e05320371fff5 (diff) | |
parent | 9832b9b2de8ce14dbce90d4cc90336984e8d83c3 (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.h | 5 |
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); |