3 //=============================================================================
5 * @file Logging_Acceptor.h
9 //=============================================================================
11 #ifndef _CLIENT_ACCEPTOR_H
12 #define _CLIENT_ACCEPTOR_H
14 #include "ace/SOCK_Acceptor.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ace/Event_Handler.h"
23 * @class Logging_Acceptor
25 * @brief Handle connection requests from remote client clients.
27 * Accepts client connection requests, creates Logging_Handler's
28 * to process them, and registers these Handlers with the
29 * ACE_Reactor Singleton.
31 class Logging_Acceptor
: public ACE_Event_Handler
33 friend class Logging_Handler
;
36 Logging_Acceptor () = default;
39 int open (const ACE_INET_Addr
&a
);
43 int handle_input (ACE_HANDLE
) override
;
44 int handle_close (ACE_HANDLE
, ACE_Reactor_Mask
) override
;
45 ACE_HANDLE
get_handle () const override
;
47 /// By making this private we ensure that the <Logging_Acceptor> is
48 /// allocated dynamically.
49 ~Logging_Acceptor () = default;
51 /// Passive connection acceptor factory.
52 ACE_SOCK_Acceptor peer_acceptor_
;
55 #endif /* _CLIENT_ACCEPTOR_H */