2 ** Copyright 2002 Addison Wesley. All Rights Reserved.
5 #ifndef _LOGGING_ACCEPTOR_EX_H
6 #define _LOGGING_ACCEPTOR_EX_H
8 #include "ace/INET_Addr.h"
9 #include "ace/Reactor.h"
11 #include "Logging_Acceptor.h"
12 #include "Logging_Event_Handler_Ex.h"
14 class Logging_Acceptor_Ex
: public Logging_Acceptor
17 typedef ACE_INET_Addr PEER_ADDR
;
19 // Simple constructor to pass ACE_Reactor to base class.
20 Logging_Acceptor_Ex (ACE_Reactor
*r
= ACE_Reactor::instance ())
21 : Logging_Acceptor (r
) {}
23 int handle_input (ACE_HANDLE
) {
24 Logging_Event_Handler_Ex
*peer_handler
= 0;
25 ACE_NEW_RETURN (peer_handler
,
26 Logging_Event_Handler_Ex (reactor ()),
28 if (acceptor_
.accept (peer_handler
->peer ()) == -1) {
31 } else if (peer_handler
->open () == -1) {
32 peer_handler
->handle_close ();
39 #endif /* _LOGGING_ACCEPTOR_EX_H */