2 #ifndef TERA_SS_SERVICE_HANDLER_H
3 #define TERA_SS_SERVICE_HANDLER_H
6 #include "ace/Acceptor.h"
7 #include "ace/Svc_Handler.h"
8 #include "ace/SOCK_Acceptor.h"
9 #include "ace/svc_export.h"
11 #include "jaws3/Protocol_Handler.h"
15 class TeraSS_Service_Handler
16 : public ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_NULL_SYNCH
>
17 , public JAWS_Protocol_Handler
19 // The Small Server service handler.
22 // This class is responsible for initializing the JAWS_Protocol_Handler
23 // with the correct state and data so that the Small Server can
24 // be properly serviced by the underlying framework.
26 // This class should perhaps be factored out into a template so that
27 // there is less programming effort.
30 TeraSS_Service_Handler ();
34 int close (unsigned long);
40 class ACE_Svc_Export TeraSS_Acceptor
41 : public ACE_Acceptor
<TeraSS_Service_Handler
, ACE_SOCK_ACCEPTOR
>
43 // The Small Server acceptor.
46 // The role of this class is to serve the acceptor role in the
47 // acceptor pattern. It interacts with the Reactor to perform
48 // accepts asynchronously. Upon completion, the service handler
52 int init (int argc
, ACE_TCHAR
*argv
[]);
55 ACE_SVC_FACTORY_DECLARE (TeraSS_Acceptor
)
57 #endif /* TERA_SS_SERVICE_HANDLER_H */