Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / Logger / Acceptor-server / server_loggerd.h
blob46820b903eeed7c20e8fa2f1795d8988b3b9696a
1 // Define classes used with templates in server_loggerd.h.
3 #ifndef __SERVER_LOGGERD_H
4 #define __SERVER_LOGGERD_H
6 #include "ace/SOCK_Stream.h"
7 #include "ace/Svc_Handler.h"
8 #include "ace/os_include/os_netdb.h"
10 class Options
12 // = TITLE
13 // Keeps track of the options.
14 public:
15 void parse_args (int argc, ACE_TCHAR *argv[]);
16 u_short port ();
18 private:
19 u_short port_;
20 // Port number;
24 class Logging_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
25 // = TITLE
26 // Receive client message from the remote clients.
28 // = DESCRIPTION
29 // This class demonstrates how to receive messages from remote
30 // clients using the notification mechanisms in the
31 // <ACE_Reactor>. In addition, it also illustrates how to
32 // utilize the <ACE_Reactor> timer mechanisms, as well.
34 public:
35 Logging_Handler ();
37 // = Hooks for opening and closing handlers.
38 virtual int open (void *);
40 protected:
41 // = Demultiplexing hooks.
42 virtual int handle_input (ACE_HANDLE);
43 virtual int handle_timeout (const ACE_Time_Value &tv,
44 const void *arg);
46 private:
47 char peer_name_[MAXHOSTNAMELEN + 1];
48 // Host we are connected to.
51 #endif /* __SERVER_LOGGERD_H */