Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / C++NPv1 / Process_Per_Connection_Logging_Server.h
blob5ce9920f8d35812a6b40cb6fe566ec9f3b25a5ce
1 /*
2 ** Copyright 2001 Addison Wesley. All Rights Reserved.
3 */
5 #ifndef _PROCESS_PER_CONNECTION_LOGGING_SERVER_H
6 #define _PROCESS_PER_CONNECTION_LOGGING_SERVER_H
8 #include "ace/INET_Addr.h"
9 #include "ace/Log_Record.h"
10 #include "ace/Process.h"
11 #include "ace/Process_Manager.h"
12 #include "ace/SOCK_Acceptor.h"
13 #include "ace/SOCK_Stream.h"
14 #include "ace/Signal.h"
15 #include "Logging_Server.h"
17 class Logging_Process : public ACE_Process
19 public:
20 Logging_Process (const char *prog_name,
21 const ACE_SOCK_Stream &logging_peer);
23 virtual int prepare (ACE_Process_Options &options);
24 virtual void unmanage ();
26 private:
27 Logging_Process (); // Force desired constructor to be used.
29 char prog_name_[MAXPATHLEN + 1];
30 ACE_SOCK_Stream logging_peer_;
34 class Process_Per_Connection_Logging_Server : public Logging_Server
36 protected:
37 char prog_name_[MAXPATHLEN + 1];
39 protected:
40 virtual int handle_connections ();
41 virtual int handle_data (ACE_SOCK_Stream *client = 0);
43 int run_master (int argc, char *argv[]);
44 int run_worker (int argc, char *argv[]);
46 public:
47 virtual int run (int argc, char *argv[]);
50 #endif /* _PROCESS_PER_CONNECTION_LOGGING_SERVER_H */