From 5ab4ca5ed838221de17f2cc05a7655dedf516065 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 24 Oct 2016 10:49:55 -0700 Subject: Add endpoint interface in transport --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 11 ++++++++++- src/core/ext/transport/cronet/transport/cronet_transport.c | 9 ++++++++- src/core/lib/transport/transport.c | 5 +++++ src/core/lib/transport/transport.h | 5 +++++ src/core/lib/transport/transport_impl.h | 3 +++ 5 files changed, 31 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 97780d90f2..9f7bc818b6 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2157,6 +2157,14 @@ static char *chttp2_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *t) { return gpr_strdup(((grpc_chttp2_transport *)t)->peer_string); } +/******************************************************************************* + * MONITORING + */ +static grpc_endpoint *chttp2_get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *t) { + return ((grpc_chttp2_transport *)t)->ep; +} + static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), "chttp2", init_stream, @@ -2166,7 +2174,8 @@ static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), perform_transport_op, destroy_stream, destroy_transport, - chttp2_get_peer}; + chttp2_get_peer, + chttp2_get_endpoint}; grpc_transport *grpc_create_chttp2_transport( grpc_exec_ctx *exec_ctx, const grpc_channel_args *channel_args, diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 25ad40b935..2cd25d6891 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -42,6 +42,7 @@ #include #include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" +#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/channel.h" @@ -1054,6 +1055,11 @@ static char *get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { return NULL; } +static grpc_endpoint *get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *gt) { + return NULL; +} + static void perform_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_transport_op *op) {} @@ -1066,4 +1072,5 @@ const grpc_transport_vtable grpc_cronet_vtable = {sizeof(stream_obj), perform_op, destroy_stream, destroy_transport, - get_peer}; + get_peer, + get_endpoint}; diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 75aec7a5b4..a3713f037f 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -159,6 +159,11 @@ char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, return transport->vtable->get_peer(exec_ctx, transport); } +grpc_endpoint *grpc_transport_get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *transport) { + return transport->vtable->get_endpoint(exec_ctx, transport); +} + void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op, grpc_error *error) { diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 50253ebad1..646b7529e9 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -37,6 +37,7 @@ #include #include "src/core/lib/channel/context.h" +#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -295,6 +296,10 @@ void grpc_transport_destroy(grpc_exec_ctx *exec_ctx, grpc_transport *transport); char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *transport); +/* Get the endpoint used by \a transport */ +grpc_endpoint *grpc_transport_get_endpoint(grpc_exec_ctx *exec_ctx, + grpc_transport *transport); + /* Allocate a grpc_transport_op, and preconfigure the on_consumed closure to \a on_consumed and then delete the returned transport op */ grpc_transport_op *grpc_make_transport_op(grpc_closure *on_consumed); diff --git a/src/core/lib/transport/transport_impl.h b/src/core/lib/transport/transport_impl.h index fc7140671b..8553148c35 100644 --- a/src/core/lib/transport/transport_impl.h +++ b/src/core/lib/transport/transport_impl.h @@ -74,6 +74,9 @@ typedef struct grpc_transport_vtable { /* implementation of grpc_transport_get_peer */ char *(*get_peer)(grpc_exec_ctx *exec_ctx, grpc_transport *self); + + /* implementation of grpc_transport_get_endpoint */ + grpc_endpoint *(*get_endpoint)(grpc_exec_ctx *exec_ctx, grpc_transport *self); } grpc_transport_vtable; /* an instance of a grpc transport */ -- cgit v1.2.3 From e5ec9ac9e2e0195e04c7c99d1c2d9a87f67404fb Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 24 Oct 2016 14:43:12 -0700 Subject: Add grpc_endpoint_get_socket and GRPC_SOCKET --- src/core/lib/iomgr/endpoint.h | 6 ++++++ src/core/lib/iomgr/sockaddr_posix.h | 2 ++ src/core/lib/iomgr/sockaddr_windows.h | 2 ++ src/core/lib/iomgr/tcp_posix.c | 8 +++++++- src/core/lib/security/transport/secure_endpoint.c | 8 +++++++- test/core/internal_api_canaries/iomgr.c | 3 ++- test/core/util/mock_endpoint.c | 22 ++++++++++++---------- test/core/util/passthru_endpoint.c | 22 ++++++++++++---------- 8 files changed, 50 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 910a6f6532..22979982e4 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -39,6 +39,7 @@ #include #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/sockaddr.h" /* An endpoint caps a streaming channel between two communicating processes. Examples may be: a tcp socket, , or some shared memory. */ @@ -59,6 +60,7 @@ struct grpc_endpoint_vtable { void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); char *(*get_peer)(grpc_endpoint *ep); + GRPC_SOCKET *(*get_socket)(grpc_endpoint *ep); }; /* When data is available on the connection, calls the callback with slices. @@ -71,6 +73,10 @@ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, char *grpc_endpoint_get_peer(grpc_endpoint *ep); +/* Get the socket (file descriptor or SOCKET) used by \a ep. Return NULL if + \a ep is not using a socket. */ +GRPC_SOCKET *grpc_endpoint_get_socket(grpc_endpoint *ep); + /* Retrieve a reference to the workqueue associated with this endpoint */ grpc_workqueue *grpc_endpoint_get_workqueue(grpc_endpoint *ep); diff --git a/src/core/lib/iomgr/sockaddr_posix.h b/src/core/lib/iomgr/sockaddr_posix.h index b150de42f7..a4236ffaee 100644 --- a/src/core/lib/iomgr/sockaddr_posix.h +++ b/src/core/lib/iomgr/sockaddr_posix.h @@ -41,4 +41,6 @@ #include #include +typedef int GRPC_SOCKET; + #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H */ diff --git a/src/core/lib/iomgr/sockaddr_windows.h b/src/core/lib/iomgr/sockaddr_windows.h index 971db5b32b..507fc71f63 100644 --- a/src/core/lib/iomgr/sockaddr_windows.h +++ b/src/core/lib/iomgr/sockaddr_windows.h @@ -40,4 +40,6 @@ // must be included after the above #include +typedef SOCKET GRPC_SOCKET; + #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 00fd77679a..5ed00a8e98 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -464,6 +464,11 @@ static char *tcp_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } +static int *tcp_get_socket(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); @@ -476,7 +481,8 @@ static const grpc_endpoint_vtable vtable = {tcp_read, tcp_add_to_pollset_set, tcp_shutdown, tcp_destroy, - tcp_get_peer}; + tcp_get_peer, + tcp_get_socket}; grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, const char *peer_string) { diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index acb0113ea8..1086c3be6a 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -38,6 +38,7 @@ #include #include #include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/security/transport/tsi_error.h" #include "src/core/lib/support/string.h" @@ -365,6 +366,10 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) { return grpc_endpoint_get_peer(ep->wrapped_ep); } +static GRPC_SOCKET *endpoint_get_socket(grpc_endpoint *secure_ep) { + return NULL; +} + static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; return grpc_endpoint_get_workqueue(ep->wrapped_ep); @@ -377,7 +382,8 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_add_to_pollset_set, endpoint_shutdown, endpoint_destroy, - endpoint_get_peer}; + endpoint_get_peer, + endpoint_get_socket}; grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *transport, diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 27d630623e..3620b93285 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -84,7 +84,8 @@ static void test_code(void) { grpc_endpoint_add_to_pollset_set, grpc_endpoint_shutdown, grpc_endpoint_destroy, - grpc_endpoint_get_peer}; + grpc_endpoint_get_peer, + grpc_endpoint_get_socket}; endpoint.vtable = &vtable; grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL); diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 13e0e918fb..15e88968e8 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -35,6 +35,7 @@ #include #include +#include "src/core/lib/iomgr/sockaddr.h" typedef struct grpc_mock_endpoint { grpc_endpoint base; @@ -95,18 +96,19 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } +static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } + static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } -static const grpc_endpoint_vtable vtable = { - me_read, - me_write, - me_get_workqueue, - me_add_to_pollset, - me_add_to_pollset_set, - me_shutdown, - me_destroy, - me_get_peer, -}; +static const grpc_endpoint_vtable vtable = {me_read, + me_write, + me_get_workqueue, + me_add_to_pollset, + me_add_to_pollset_set, + me_shutdown, + me_destroy, + me_get_peer, + me_get_socket}; grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice)) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 7ed9e97bd6..5c7167207f 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -35,6 +35,7 @@ #include #include +#include "src/core/lib/iomgr/sockaddr.h" typedef struct passthru_endpoint passthru_endpoint; @@ -140,18 +141,19 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } +static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } + static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } -static const grpc_endpoint_vtable vtable = { - me_read, - me_write, - me_get_workqueue, - me_add_to_pollset, - me_add_to_pollset_set, - me_shutdown, - me_destroy, - me_get_peer, -}; +static const grpc_endpoint_vtable vtable = {me_read, + me_write, + me_get_workqueue, + me_add_to_pollset, + me_add_to_pollset_set, + me_shutdown, + me_destroy, + me_get_peer, + me_get_socket}; static void half_init(half *m, passthru_endpoint *parent) { m->base.vtable = &vtable; -- cgit v1.2.3 From 68413c221e341f4f00326e892077c5fcd4b4f788 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 2 Nov 2016 11:57:37 -0700 Subject: Remove GRPC_SOCKET --- src/core/lib/iomgr/endpoint.c | 2 ++ src/core/lib/iomgr/endpoint.h | 9 ++++----- src/core/lib/iomgr/sockaddr_posix.h | 2 -- src/core/lib/iomgr/sockaddr_windows.h | 2 -- src/core/lib/iomgr/tcp_posix.c | 6 +++--- src/core/lib/security/transport/secure_endpoint.c | 6 ++---- test/core/internal_api_canaries/iomgr.c | 2 +- test/core/util/mock_endpoint.c | 4 ++-- test/core/util/passthru_endpoint.c | 4 ++-- 9 files changed, 16 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c index f901fcf962..e70b5599a1 100644 --- a/src/core/lib/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -66,6 +66,8 @@ char* grpc_endpoint_get_peer(grpc_endpoint* ep) { return ep->vtable->get_peer(ep); } +int grpc_endpoint_get_fd(grpc_endpoint* ep) { return ep->vtable->get_fd(ep); } + grpc_workqueue* grpc_endpoint_get_workqueue(grpc_endpoint* ep) { return ep->vtable->get_workqueue(ep); } diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 22979982e4..2fa59cfc07 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -39,7 +39,6 @@ #include #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" -#include "src/core/lib/iomgr/sockaddr.h" /* An endpoint caps a streaming channel between two communicating processes. Examples may be: a tcp socket, , or some shared memory. */ @@ -60,7 +59,7 @@ struct grpc_endpoint_vtable { void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); char *(*get_peer)(grpc_endpoint *ep); - GRPC_SOCKET *(*get_socket)(grpc_endpoint *ep); + int (*get_fd)(grpc_endpoint *ep); }; /* When data is available on the connection, calls the callback with slices. @@ -73,9 +72,9 @@ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, char *grpc_endpoint_get_peer(grpc_endpoint *ep); -/* Get the socket (file descriptor or SOCKET) used by \a ep. Return NULL if - \a ep is not using a socket. */ -GRPC_SOCKET *grpc_endpoint_get_socket(grpc_endpoint *ep); +/* Get the file descriptor used by \a ep. Return -1 if \a ep is not using a 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); diff --git a/src/core/lib/iomgr/sockaddr_posix.h b/src/core/lib/iomgr/sockaddr_posix.h index a4236ffaee..b150de42f7 100644 --- a/src/core/lib/iomgr/sockaddr_posix.h +++ b/src/core/lib/iomgr/sockaddr_posix.h @@ -41,6 +41,4 @@ #include #include -typedef int GRPC_SOCKET; - #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H */ diff --git a/src/core/lib/iomgr/sockaddr_windows.h b/src/core/lib/iomgr/sockaddr_windows.h index 507fc71f63..971db5b32b 100644 --- a/src/core/lib/iomgr/sockaddr_windows.h +++ b/src/core/lib/iomgr/sockaddr_windows.h @@ -40,6 +40,4 @@ // must be included after the above #include -typedef SOCKET GRPC_SOCKET; - #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 5ed00a8e98..73e28ef5dd 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -464,9 +464,9 @@ static char *tcp_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } -static int *tcp_get_socket(grpc_endpoint *ep) { +static int tcp_get_fd(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->fd; + return tcp->fd; } static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { @@ -482,7 +482,7 @@ static const grpc_endpoint_vtable vtable = {tcp_read, tcp_shutdown, tcp_destroy, tcp_get_peer, - tcp_get_socket}; + tcp_get_fd}; grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, const char *peer_string) { diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 1086c3be6a..22dc05e9f9 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -366,9 +366,7 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) { return grpc_endpoint_get_peer(ep->wrapped_ep); } -static GRPC_SOCKET *endpoint_get_socket(grpc_endpoint *secure_ep) { - return NULL; -} +static int endpoint_get_fd(grpc_endpoint *secure_ep) { return -1; } static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; @@ -383,7 +381,7 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_shutdown, endpoint_destroy, endpoint_get_peer, - endpoint_get_socket}; + endpoint_get_fd}; grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *transport, diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 3620b93285..0995332933 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -85,7 +85,7 @@ static void test_code(void) { grpc_endpoint_shutdown, grpc_endpoint_destroy, grpc_endpoint_get_peer, - grpc_endpoint_get_socket}; + grpc_endpoint_get_fd}; endpoint.vtable = &vtable; grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL); diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 15e88968e8..063d4366cf 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -96,7 +96,7 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } -static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } +static int me_get_fd(grpc_endpoint *ep) { return -1; } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -108,7 +108,7 @@ static const grpc_endpoint_vtable vtable = {me_read, me_shutdown, me_destroy, me_get_peer, - me_get_socket}; + me_get_fd}; grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice)) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 5c7167207f..f40177819e 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -141,7 +141,7 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } -static GRPC_SOCKET *me_get_socket(grpc_endpoint *ep) { return NULL; } +static int me_get_fd(grpc_endpoint *ep) { return -1; } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -153,7 +153,7 @@ static const grpc_endpoint_vtable vtable = {me_read, me_shutdown, me_destroy, me_get_peer, - me_get_socket}; + me_get_fd}; static void half_init(half *m, passthru_endpoint *parent) { m->base.vtable = &vtable; -- cgit v1.2.3 From e942434f8d6899147b9bb396f935da2f5ec17e19 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 4 Nov 2016 15:40:20 -0700 Subject: Fix typo --- src/core/lib/iomgr/endpoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index a47b9112c5..363bd39a6d 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -74,7 +74,7 @@ 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 a fd. +/* 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); -- cgit v1.2.3