summaryrefslogtreecommitdiff
path: root/Utilities/cmlibuv/src/win/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmlibuv/src/win/udp.c')
-rw-r--r--Utilities/cmlibuv/src/win/udp.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/Utilities/cmlibuv/src/win/udp.c b/Utilities/cmlibuv/src/win/udp.c
index 3daa55f62d..508ed37fb7 100644
--- a/Utilities/cmlibuv/src/win/udp.c
+++ b/Utilities/cmlibuv/src/win/udp.c
@@ -125,17 +125,10 @@ static int uv_udp_set_socket(uv_loop_t* loop, uv_udp_t* handle, SOCKET socket,
}
-int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
- int domain;
-
- /* Use the lower 8 bits for the domain */
- domain = flags & 0xFF;
- if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC)
- return UV_EINVAL;
-
- if (flags & ~0xFF)
- return UV_EINVAL;
-
+int uv__udp_init_ex(uv_loop_t* loop,
+ uv_udp_t* handle,
+ unsigned flags,
+ int domain) {
uv__handle_init(loop, (uv_handle_t*) handle, UV_UDP);
handle->socket = INVALID_SOCKET;
handle->reqs_pending = 0;
@@ -174,11 +167,6 @@ int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
}
-int uv_udp_init(uv_loop_t* loop, uv_udp_t* handle) {
- return uv_udp_init_ex(loop, handle, AF_UNSPEC);
-}
-
-
void uv_udp_close(uv_loop_t* loop, uv_udp_t* handle) {
uv_udp_recv_stop(handle);
closesocket(handle->socket);