Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / APG / Svc_Config / HA_Status_Static.h
blobed4e175a46eec0786f3328cd924a036cde38aff1
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"
16 #include "ace/Service_Config.h"
18 class ClientHandler :
19 public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
21 // ... Same as previous examples.
24 class HA_Status : public ACE_Service_Object
26 public:
27 virtual int init (int argc, ACE_TCHAR *argv[]);
28 virtual int fini ();
29 virtual int info (ACE_TCHAR **str, size_t len) const;
31 private:
32 ACE_Acceptor<ClientHandler, ACE_SOCK_ACCEPTOR> acceptor_;
33 ACE_INET_Addr listen_addr_;
35 // Listing 1
37 #endif /* __HASTATUS_H_ */