Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Logger / simple-server / Logging_Acceptor.h
blobd7c8899e5a2a2f7627db0b09e72fc73a7d540a22
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Logging_Acceptor.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
11 #ifndef _CLIENT_ACCEPTOR_H
12 #define _CLIENT_ACCEPTOR_H
14 #include "ace/SOCK_Acceptor.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ace/Event_Handler.h"
22 /**
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;
34 public:
35 /// Constructor.
36 Logging_Acceptor () = default;
38 /// Initialization.
39 int open (const ACE_INET_Addr &a);
41 private:
42 // = Demuxing hooks.
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 */