summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>1999-02-17 00:20:00 +0000
committerSteve Huston <shuston@riverace.com>1999-02-17 00:20:00 +0000
commit44d83c414e1037313b65f681643d807fa185755c (patch)
tree1560f34935ff62c1e5bd0887dea361224b29bd20 /examples
parentcbef364f1d1f1a053dd05fa758efedde41a9b294 (diff)
downloadATCD-44d83c414e1037313b65f681643d807fa185755c.tar.gz
Moved Connection_Handler class def to new file to build ok on AIX xlC.
Diffstat (limited to 'examples')
-rw-r--r--examples/Connection/misc/Connection_Handler.cpp35
-rw-r--r--examples/Connection/misc/Connection_Handler.h45
2 files changed, 47 insertions, 33 deletions
diff --git a/examples/Connection/misc/Connection_Handler.cpp b/examples/Connection/misc/Connection_Handler.cpp
index 370a7a39451..13c58a1c629 100644
--- a/examples/Connection/misc/Connection_Handler.cpp
+++ b/examples/Connection/misc/Connection_Handler.cpp
@@ -21,40 +21,9 @@
#include "ace/Service_Config.h"
#include "ace/Thread.h"
-ACE_RCSID(misc, Connection_Handler, "$Id$")
-
-class Connection_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
-{
-public:
- virtual int open (void *);
- // Initialize the <Connection_Handler> and make it an Active Object.
-
- virtual int close (u_long);
- // Terminate the <Connection_Handler>.
-
- virtual int svc (void);
- // Run the <Connection_Handler>'s main event loop.
+#include "Connection_Handler.h"
-protected:
- virtual int handle_close (ACE_HANDLE,
- ACE_Reactor_Mask);
- // Signal the Active Object to stop when called.
-
- virtual int handle_input (ACE_HANDLE);
- // Handle input from the client.
-
- virtual int handle_timeout (const ACE_Time_Value &tv,
- const void *arg);
- // Handle timeouts.
-
- virtual int handle_signal (int signum,
- siginfo_t *,
- ucontext_t *);
- // Handle timeouts.
-
- sig_atomic_t finished_;
- // Keeps track of whether we're done.
-};
+ACE_RCSID(misc, Connection_Handler, "$Id$")
int
Connection_Handler::open (void *)
diff --git a/examples/Connection/misc/Connection_Handler.h b/examples/Connection/misc/Connection_Handler.h
new file mode 100644
index 00000000000..de243d3ed02
--- /dev/null
+++ b/examples/Connection/misc/Connection_Handler.h
@@ -0,0 +1,45 @@
+/* -*- C++ -*- */
+
+// $Id$
+
+#ifndef ACE_CONNECTION_HANDLER_H
+#define ACE_CONNECTION_HANDLER_H
+
+#include "ace/SOCK_Stream.h"
+#include "ace/Svc_Handler.h"
+#include "ace/Synch.h"
+
+class Connection_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
+{
+public:
+ virtual int open (void *);
+ // Initialize the <Connection_Handler> and make it an Active Object.
+
+ virtual int close (u_long);
+ // Terminate the <Connection_Handler>.
+
+ virtual int svc (void);
+ // Run the <Connection_Handler>'s main event loop.
+
+protected:
+ virtual int handle_close (ACE_HANDLE,
+ ACE_Reactor_Mask);
+ // Signal the Active Object to stop when called.
+
+ virtual int handle_input (ACE_HANDLE);
+ // Handle input from the client.
+
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+ // Handle timeouts.
+
+ virtual int handle_signal (int signum,
+ siginfo_t *,
+ ucontext_t *);
+ // Handle timeouts.
+
+ sig_atomic_t finished_;
+ // Keeps track of whether we're done.
+};
+
+#endif /* ACE_CONNECTION_HANDLER_H */