Skip to content

Commit

Permalink
New macro ASIO_DISABLE_CONNECTEX to disable ConnectEx use.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Mar 19, 2015
1 parent 164b961 commit 4b1731d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,11 @@ win_iocp_socket_service_base::connect_ex_fn
win_iocp_socket_service_base::get_connect_ex(
win_iocp_socket_service_base::base_implementation_type& impl, int type)
{
#if defined(ASIO_DISABLE_CONNECTEX)
(void)impl;
(void)type;
return 0;
#else // defined(ASIO_DISABLE_CONNECTEX)
if (type != ASIO_OS_DEF(SOCK_STREAM)
&& type != ASIO_OS_DEF(SOCK_SEQPACKET))
return 0;
Expand All @@ -696,6 +701,7 @@ win_iocp_socket_service_base::get_connect_ex(
}

return reinterpret_cast<connect_ex_fn>(ptr == this ? 0 : ptr);
#endif // defined(ASIO_DISABLE_CONNECTEX)
}

void* win_iocp_socket_service_base::interlocked_compare_exchange_pointer(
Expand Down

0 comments on commit 4b1731d

Please sign in to comment.