diff options
Diffstat (limited to 'src/core/iomgr/tcp_posix.h')
-rw-r--r-- | src/core/iomgr/tcp_posix.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/iomgr/tcp_posix.h b/src/core/iomgr/tcp_posix.h index b554983ae1..495ed009c8 100644 --- a/src/core/iomgr/tcp_posix.h +++ b/src/core/iomgr/tcp_posix.h @@ -56,6 +56,12 @@ extern int grpc_tcp_trace; grpc_endpoint *grpc_tcp_create(grpc_fd *fd, size_t read_slice_size, const char *peer_string); +/* Return the tcp endpoint's fd, or -1 if this is not available. Does not + release the fd. + Requires: ep must be a tcp endpoint. + */ +int grpc_tcp_fd(grpc_endpoint *ep); + /* Destroy the tcp endpoint without closing its fd. *fd will be set and done * will be called when the endpoint is destroyed. * Requires: ep must be a tcp endpoint and fd must not be NULL. */ |