diff options
author | kpayson64 <kpayson@google.com> | 2018-03-12 19:16:30 -0700 |
---|---|---|
committer | kpayson64 <kpayson@google.com> | 2018-03-13 01:21:42 -0700 |
commit | 539f5068bd14e3d07b58309b657222919e94aba5 (patch) | |
tree | bc5980993f806841a79c973d302524ab8adba576 /src/core/lib/iomgr/socket_utils_windows.cc | |
parent | 44fd6557aefad4689eac7225386aecefd1f9a5bc (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_windows.cc')
-rw-r--r-- | src/core/lib/iomgr/socket_utils_windows.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/socket_utils_windows.cc b/src/core/lib/iomgr/socket_utils_windows.cc index 5fc3b7617e..3e7b5b812d 100644 --- a/src/core/lib/iomgr/socket_utils_windows.cc +++ b/src/core/lib/iomgr/socket_utils_windows.cc @@ -27,6 +27,14 @@ #include <grpc/support/log.h> +uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); } + +uint16_t grpc_ntohs(uint16_t netshort) { return ntohs(netshort); } + +int grpc_inet_pton(int af, const char* src, void* dst) { + return inet_pton(af, src, dst); +} + const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size) { /* Windows InetNtopA wants a mutable ip pointer */ return InetNtopA(af, (void*)src, dst, size); |