aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/socket_utils.h
diff options
context:
space:
mode:
authorGravatar kpayson64 <kpayson@google.com>2018-03-12 19:16:30 -0700
committerGravatar kpayson64 <kpayson@google.com>2018-03-13 01:21:42 -0700
commit539f5068bd14e3d07b58309b657222919e94aba5 (patch)
treebc5980993f806841a79c973d302524ab8adba576 /src/core/lib/iomgr/socket_utils.h
parent44fd6557aefad4689eac7225386aecefd1f9a5bc (diff)
Abstract libuv implementation
Structures the libuv implementation to allow for a plugable BSD style socket implementation to allow for other IO Managers
Diffstat (limited to 'src/core/lib/iomgr/socket_utils.h')
-rw-r--r--src/core/lib/iomgr/socket_utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h
index e96eb97a7e..cf1a7be648 100644
--- a/src/core/lib/iomgr/socket_utils.h
+++ b/src/core/lib/iomgr/socket_utils.h
@@ -23,6 +23,15 @@
#include <stddef.h>
+/* A wrapper for htons on POSIX and Windows */
+uint16_t grpc_htons(uint16_t hostshort);
+
+/* A wrapper for ntohs on POSIX and WINDOWS */
+uint16_t grpc_ntohs(uint16_t netshort);
+
+/* A wrapper for inet_pton on POSIX and WINDOWS */
+int grpc_inet_pton(int af, const char* src, void* dst);
+
/* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */
const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size);