aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/endpoint.h
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-11-02 11:57:37 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-11-02 11:57:37 -0700
commit68413c221e341f4f00326e892077c5fcd4b4f788 (patch)
tree8f55f49a3d203fc76031c2b704fe60e9567a76e5 /src/core/lib/iomgr/endpoint.h
parente5ec9ac9e2e0195e04c7c99d1c2d9a87f67404fb (diff)
Remove GRPC_SOCKET
Diffstat (limited to 'src/core/lib/iomgr/endpoint.h')
-rw-r--r--src/core/lib/iomgr/endpoint.h9
1 files changed, 4 insertions, 5 deletions
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 <grpc/support/time.h>
#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, <stdin+stdout>, 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);