Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / APG / Svc_Config / HA_Status_Dynamic.h
blob4b5cc137060705bf9e250984d95db565e9598b21
1 /**
2 * Home Automation Status server. Sample code from The ACE Programmer's Guide,
3 * copyright 2003 Addison-Wesley. All Rights Reserved.
4 */
6 #ifndef __HASTATUS_H_
7 #define __HASTATUS_H_
9 // Listing 1 code/ch19
10 #include "ace/Acceptor.h"
11 #include "ace/INET_Addr.h"
12 #include "ace/SOCK_Stream.h"
13 #include "ace/SOCK_Acceptor.h"
14 #include "ace/Service_Object.h"
15 #include "ace/Svc_Handler.h"
17 #include "HASTATUS_export.h"
19 class ClientHandler :
20 public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
22 // ... Same as previous examples.
25 class HASTATUS_Export HA_Status : public ACE_Service_Object
27 public:
28 virtual int init (int argc, ACE_TCHAR *argv[]);
30 virtual int fini ();
32 virtual int info (ACE_TCHAR **str, size_t len) const;
34 private:
35 ACE_Acceptor<ClientHandler, ACE_SOCK_ACCEPTOR> acceptor_;
36 ACE_INET_Addr listen_addr_;
38 // Listing 1
40 #endif /* __HASTATUS_H_ */