summaryrefslogtreecommitdiff
path: root/ACE/apps/JAWS3/small/SS_Service_Handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/apps/JAWS3/small/SS_Service_Handler.h')
-rw-r--r--ACE/apps/JAWS3/small/SS_Service_Handler.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/ACE/apps/JAWS3/small/SS_Service_Handler.h b/ACE/apps/JAWS3/small/SS_Service_Handler.h
new file mode 100644
index 00000000000..63a48324a1c
--- /dev/null
+++ b/ACE/apps/JAWS3/small/SS_Service_Handler.h
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+// $Id$
+
+#ifndef TERA_SS_SERVICE_HANDLER_H
+#define TERA_SS_SERVICE_HANDLER_H
+
+#include "ace/OS.h"
+#include "ace/Synch.h"
+#include "ace/Acceptor.h"
+#include "ace/Svc_Handler.h"
+#include "ace/SOCK_Acceptor.h"
+
+#include "jaws3/Protocol_Handler.h"
+
+#include "SS_Data.h"
+
+class TeraSS_Service_Handler
+ : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
+ , public JAWS_Protocol_Handler
+// = TITLE
+// The Small Server service handler.
+//
+// = DESCRIPTION
+// This class is reponsible for initializing the JAWS_Protocol_Handler
+// with the correct state and data so that the Small Server can
+// be properly serviced by the underlying framework.
+//
+// This class should perhaps be factored out into a template so that
+// there is less programming effort.
+{
+public:
+
+ TeraSS_Service_Handler (void);
+
+ int open (void *);
+
+ int close (unsigned long);
+
+private:
+
+ TeraSS_Data data_;
+
+};
+
+class ACE_Svc_Export TeraSS_Acceptor
+ : public ACE_Acceptor<TeraSS_Service_Handler, ACE_SOCK_ACCEPTOR>
+// = TITLE
+// The Small Server acceptor.
+//
+// = DESCRIPTION
+// The role of this class is to serve the acceptor role in the
+// acceptor pattern. It interacts with the Reactor to perform
+// accepts asynchronously. Upon completion, the service handler
+// is created.
+{
+public:
+
+ int init (int argc, ACE_TCHAR *argv[]);
+
+};
+
+ACE_SVC_FACTORY_DECLARE (TeraSS_Acceptor)
+
+#endif /* TERA_SS_SERVICE_HANDLER_H */