diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-06-18 18:53:27 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-06-18 18:53:27 +0000 |
commit | 152c0f5c127eac99b5c9097aa4db2b34e14e6dd0 (patch) | |
tree | 0d399a92623e98588cd34e4fe0c2cf7fed880173 /examples/C++NPv2/Logging_Acceptor.cpp | |
parent | 7e7f4a5d3e77a42e648b7dd2e1b9cf23a3780955 (diff) | |
download | ATCD-MyACE.tar.gz |
This commit was manufactured by cvs2svn to create branch 'MyACE'.MyACE
Diffstat (limited to 'examples/C++NPv2/Logging_Acceptor.cpp')
-rw-r--r-- | examples/C++NPv2/Logging_Acceptor.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/examples/C++NPv2/Logging_Acceptor.cpp b/examples/C++NPv2/Logging_Acceptor.cpp deleted file mode 100644 index 2e7b7479603..00000000000 --- a/examples/C++NPv2/Logging_Acceptor.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* -** $Id$ -** -** Copyright 2002 Addison Wesley. All Rights Reserved. -*/ - -#include "Logging_Acceptor.h" -#include "Logging_Event_Handler.h" - - -int Logging_Acceptor::open (const ACE_INET_Addr &local_addr) { - if (acceptor_.open (local_addr) == -1) return -1; - return reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -int Logging_Acceptor::handle_input (ACE_HANDLE) { - Logging_Event_Handler *peer_handler = 0; - ACE_NEW_RETURN (peer_handler, - Logging_Event_Handler (reactor ()), - -1); - - if (acceptor_.accept (peer_handler->peer ()) == -1) { - delete peer_handler; - return -1; - } else if (peer_handler->open () == -1) { - peer_handler->handle_close (); - return -1; - } - return 0; -} - -int Logging_Acceptor::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) { - acceptor_.close (); - delete this; - return 0; -} |