2 ** Copyright 2002 Addison Wesley. All Rights Reserved.
5 #include "Logging_Acceptor.h"
6 #include "Logging_Event_Handler.h"
9 int Logging_Acceptor::open (const ACE_INET_Addr
&local_addr
) {
10 if (acceptor_
.open (local_addr
) == -1) return -1;
11 return reactor ()->register_handler
12 (this, ACE_Event_Handler::ACCEPT_MASK
);
15 int Logging_Acceptor::handle_input (ACE_HANDLE
) {
16 Logging_Event_Handler
*peer_handler
= 0;
17 ACE_NEW_RETURN (peer_handler
,
18 Logging_Event_Handler (reactor ()),
21 if (acceptor_
.accept (peer_handler
->peer ()) == -1) {
24 } else if (peer_handler
->open () == -1) {
25 peer_handler
->handle_close ();
31 int Logging_Acceptor::handle_close (ACE_HANDLE
,