summaryrefslogtreecommitdiff
path: root/grpc/src/core/lib/iomgr/tcp_posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/src/core/lib/iomgr/tcp_posix.h')
-rw-r--r--grpc/src/core/lib/iomgr/tcp_posix.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/grpc/src/core/lib/iomgr/tcp_posix.h b/grpc/src/core/lib/iomgr/tcp_posix.h
index eff825cb..d657539b 100644
--- a/grpc/src/core/lib/iomgr/tcp_posix.h
+++ b/grpc/src/core/lib/iomgr/tcp_posix.h
@@ -31,30 +31,35 @@
#include <grpc/support/port_platform.h>
-#include "src/core/lib/iomgr/port.h"
-
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/buffer_list.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/ev_posix.h"
+#include "src/core/lib/iomgr/port.h"
extern grpc_core::TraceFlag grpc_tcp_trace;
-/* Create a tcp endpoint given a file desciptor and a read slice size.
- Takes ownership of fd. */
+/// Create a tcp endpoint given a file desciptor and a read slice size.
+/// Takes ownership of \a fd. Takes ownership of the \a slice_allocator.
grpc_endpoint* grpc_tcp_create(grpc_fd* fd, const grpc_channel_args* args,
- const char* peer_string);
+ absl::string_view 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.
- */
+/// Return the tcp endpoint's fd, or -1 if this is not available. Does not
+/// release the fd. Requires: \a 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. */
+/// Destroy the tcp endpoint without closing its fd. *fd will be set and done
+/// will be called when the endpoint is destroyed. Requires: \a ep must be a tcp
+/// endpoint and fd must not be NULL.
void grpc_tcp_destroy_and_release_fd(grpc_endpoint* ep, int* fd,
grpc_closure* done);
+#ifdef GRPC_POSIX_SOCKET_TCP
+
+void grpc_tcp_posix_init();
+
+void grpc_tcp_posix_shutdown();
+
+#endif /* GRPC_POSIX_SOCKET_TCP */
+
#endif /* GRPC_CORE_LIB_IOMGR_TCP_POSIX_H */