summaryrefslogtreecommitdiff
path: root/ace/Asynch_Acceptor.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-09 08:27:31 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-09 08:27:31 +0000
commitf0c080fdc364d753e4858872160be9e46c9c72ee (patch)
tree9000a3a9fd0ef9533bce2ec9ee8574bb0253ac78 /ace/Asynch_Acceptor.cpp
parent75c135d4ee37b69f112affec1948ef387456dce9 (diff)
downloadATCD-f0c080fdc364d753e4858872160be9e46c9c72ee.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Asynch_Acceptor.cpp')
-rw-r--r--ace/Asynch_Acceptor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp
index 07939c729e4..9d5386ceb3c 100644
--- a/ace/Asynch_Acceptor.cpp
+++ b/ace/Asynch_Acceptor.cpp
@@ -4,8 +4,8 @@
#define ACE_BUILD_DLL
#include "ace/Asynch_Acceptor.h"
-#if defined (ACE_WIN32)
-// This only works on Win32 platforms
+#if defined (ACE_WIN32)
+// This only works on Win32 platforms
#include "ace/Message_Block.h"
#include "ace/INET_Addr.h"
@@ -110,6 +110,7 @@ ACE_Asynch_Acceptor<HANDLER>::accept (size_t bytes_to_read)
template <class HANDLER> void
ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &result)
{
+#if defined (ACE_HAS_WINSOCK2) || (_WIN32_WINNT >= 0x0400)
// If the asynchronous accept succeeds
if (result.success ())
{
@@ -156,6 +157,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
// Start off another asynchronous accept to keep the backlog going
this->accept (this->bytes_to_read_);
+#endif // defined (ACE_HAS_WINSOCK2) || (_WIN32_WINNT >= 0x0400)
}
template <class HANDLER> int
@@ -172,6 +174,7 @@ ACE_Asynch_Acceptor<HANDLER>::parse_address (ACE_Message_Block &message_block,
ACE_INET_Addr &remote_address,
ACE_INET_Addr &local_address)
{
+#if defined (ACE_HAS_WINSOCK2) || (_WIN32_WINNT >= 0x0400)
sockaddr *local_addr = 0;
sockaddr *remote_addr = 0;
int local_size = 0;
@@ -188,6 +191,10 @@ ACE_Asynch_Acceptor<HANDLER>::parse_address (ACE_Message_Block &message_block,
local_address.set_addr ((sockaddr_in *) local_addr, local_size);
remote_address.set_addr ((sockaddr_in *) remote_addr, remote_size);
+#else
+ // just in case
+ errno = ENOTSUP;
+#endif // defined (ACE_HAS_WINSOCK2) || (_WIN32_WINNT >= 0x0400)
}
template <class HANDLER> ACE_HANDLE