From 539f5068bd14e3d07b58309b657222919e94aba5 Mon Sep 17 00:00:00 2001 From: kpayson64 Date: Mon, 12 Mar 2018 19:16:30 -0700 Subject: Abstract libuv implementation Structures the libuv implementation to allow for a plugable BSD style socket implementation to allow for other IO Managers --- src/core/lib/iomgr/socket_utils.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/lib/iomgr/socket_utils.h') 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 +/* 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); -- cgit v1.2.3