From 44d83c414e1037313b65f681643d807fa185755c Mon Sep 17 00:00:00 2001 From: Steve Huston Date: Wed, 17 Feb 1999 00:20:00 +0000 Subject: Moved Connection_Handler class def to new file to build ok on AIX xlC. --- examples/Connection/misc/Connection_Handler.cpp | 35 ++----------------- examples/Connection/misc/Connection_Handler.h | 45 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 33 deletions(-) create mode 100644 examples/Connection/misc/Connection_Handler.h (limited to 'examples') 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 -{ -public: - virtual int open (void *); - // Initialize the and make it an Active Object. - - virtual int close (u_long); - // Terminate the . - - virtual int svc (void); - // Run the '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 +{ +public: + virtual int open (void *); + // Initialize the and make it an Active Object. + + virtual int close (u_long); + // Terminate the . + + virtual int svc (void); + // Run the '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 */ -- cgit v1.2.1