diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-09 22:33:26 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-09 22:33:26 +0000 |
commit | 29d7b9c59b8b55d1dbf5356c948e2fb5336659ec (patch) | |
tree | 0e5cdcdec085b1b6af00fc4d3065ff4203bc7142 /apps | |
parent | ce53bf64867f0f49846d18b9a5e2a59ce78f2d54 (diff) | |
download | ATCD-29d7b9c59b8b55d1dbf5356c948e2fb5336659ec.tar.gz |
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/HTTP_10.cpp | 63 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/HTTP_10.h | 47 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/main.cpp | 61 |
3 files changed, 20 insertions, 151 deletions
diff --git a/apps/JAWS/server/PROTOTYPE/HTTP_10.cpp b/apps/JAWS/server/PROTOTYPE/HTTP_10.cpp index 3b80f871a8d..e4644c78fdf 100644 --- a/apps/JAWS/server/PROTOTYPE/HTTP_10.cpp +++ b/apps/JAWS/server/PROTOTYPE/HTTP_10.cpp @@ -2,67 +2,20 @@ #include "JAWS/HTTP_10.h" -JAWS_HTTP_IO_Handler::JAWS_HTTP_IO_Handler (JAWS_IO *io) - : io_(io) +JAWS_HTTP_10_Read_Task::JAWS_HTTP_10_Read_Task (void) { } -JAWS_HTTP_IO_Handler::~JAWS_HTTP_IO_Handler (void) +JAWS_HTTP_10_Read_Task::~JAWS_HTTP_10_Read_Task (void) { } -void -JAWS_HTTP_IO_Handler::accept_complete (void) +int +JAWS_HTTP_10_Read_Task::handle_put (JAWS_Data_Block *data, ACE_Time_Value *) { -} - -void -JAWS_HTTP_IO_Handler::accept_error (void) -{ -} - -void -JAWS_HTTP_IO_Handler::read_complete (ACE_Message_Block &data) -{ -} - -void -JAWS_HTTP_IO_Handler::read_error (void) -{ -} - -void -JAWS_HTTP_IO_Handler::transmit_file_complete (void) -{ -} - -void -JAWS_HTTP_IO_Handler::transmit_file_error (int result) -{ -} - -void -JAWS_HTTP_IO_Handler::receive_file_complete (void) -{ -} + JAWS_Dispatch_Policy *policy = data->policy (); + JAWS_IO_Handler *handler = data->handler (); + JAWS_Pipeline_Handler *task = data->task (); -void -JAWS_HTTP_IO_Handler::receive_file_error (int result) -{ -} - -void -JAWS_HTTP_IO_Handler::write_error (void) -{ + JAWS_IO *io = policy->io (); } - -void -JAWS_HTTP_IO_Handler::confirmation_message_complete (void) -{ -} - -void -JAWS_HTTP_IO_Handler::error_message_complete (void) -{ -} - diff --git a/apps/JAWS/server/PROTOTYPE/HTTP_10.h b/apps/JAWS/server/PROTOTYPE/HTTP_10.h index 039aff1e68f..acf174e2aa7 100644 --- a/apps/JAWS/server/PROTOTYPE/HTTP_10.h +++ b/apps/JAWS/server/PROTOTYPE/HTTP_10.h @@ -1,55 +1,20 @@ /* -*- c++ -*- */ +// $Id$ #if !defined (JAWS_HTTP_10_H) #define JAWS_HTTP_10_H -#include "JAWS/IO.h" +#include "JAWS/Data_Block.h" -class JAWS_HTTP_IO_Handler : protected JAWS_IO_Handler +class JAWS_HTTP_10_Read_Task : public JAWS_Pipeline_Handler { public: - JAWS_HTTP_IO_Handler (JAWS_IO *io); - ~JAWS_HTTP_IO_Handler (void); + JAWS_HTTP_10_Read_Task (void); + virtual ~JAWS_HTTP_10_Read_Task (void); - ACE_Message_Block *state (void); - -protected: - // The following methods are inherited from JAWS_IO_Handler - - virtual void accept_complete (void); - virtual void accept_error (void); - virtual void read_complete (ACE_Message_Block &data); - virtual void read_error (void); - virtual void transmit_file_complete (void); - virtual void transmit_file_error (int result); - virtual void receive_file_complete (void); - virtual void receive_file_error (int result); - virtual void write_error (void); - virtual void confirmation_message_complete (void); - virtual void error_message_complete (void); - -private: - ACE_Message_Block *state_; - // This maintains the state of the request. - - JAWS_IO *io_; - // The reference to our IO interface (synch vs. asynch) - - JAWS_Pipeline *pipeline_; - // This is a reference to the next stage of the pipeline when the IO - // request completes. - - JAWS_HTTP_IO_Handler_Factory *factory_; -}; - -class JAWS_HTTP_Data_Block : public ACE_Data_Block -{ -public: - JAWS_HTTP_Data_Block (void); - virtual ~JAWS_HTTP_Data_Block (void); + virtual int handle_put (JAWS_Data_Block *data, ACE_Time_Value *tv) private: }; - #endif /* !defined (JAWS_HTTP_10_H) */ diff --git a/apps/JAWS/server/PROTOTYPE/main.cpp b/apps/JAWS/server/PROTOTYPE/main.cpp index 58cec321523..01af87928f0 100644 --- a/apps/JAWS/server/PROTOTYPE/main.cpp +++ b/apps/JAWS/server/PROTOTYPE/main.cpp @@ -1,65 +1,16 @@ // $Id$ -#include "ace/Get_Opt.h" - -#include "HTTP_Policy.h" - -// Parse arguments - -struct SERVER_FLAGS -{ - int port; // port to listen on - int concurrency; // 0 => pool, 1 => per - int nthreads; // number of threads - int maxthreads; // maximum number of threads - long flags; // thread creation flags -}; - -static SERVER_FLAGS parse_args (int argc, char *argv[]) -{ - int c; - SERVER_FLAGS sflags; - - sflags.port = 5432; - sflags.concurrency = 0; - sflags.nthreads = 5; - sflags.maxthreads = 20; - sflags.flags = THR_NEW_LWP; - - ACE_Get_Opt getopt (argc, argv, "p:c:n:m:f:"); - while ((c = getopt ()) != -1) - switch (c) - { - case 'p': - sflags.port = ACE_OS::atoi (getopt.optarg); - break; - case 'c': - sflags.concurrency = - (ACE_OS::strcmp (getopt.optarg, "PER_REQUEST") == 0); - break; - case 'n': - sflags.nthreads = ACE_OS::atoi (getopt.optarg); - break; - case 'm': - sflags.maxthreads = ACE_OS::atoi (getopt.optarg); - break; - case 'f': - if (ACE_OS::strcmp (getopt.optarg, "THR_BOUND") == 0) - sflags.flags |= THR_BOUND; - else if (ACE_OS::strcmp (getopt.optarg, "THR_DAEMON") == 0) - sflags.flags |= THR_DAEMON; - else if (ACE_OS::strcmp (getopt.optarg, "THR_DETACHED") == 0) - sflags.flags |= THR_DETACHED; - break; - } - - return sflags; -} +#include "JAWS/Server.h" +#include "HTTP_10.h" int main (int argc, char *argv[]) { + JAWS_Server server (argc, argv); + HTTP_Pipeline HTTP; + if (server.open (&HTTP) == -1) + ACE_DEBUG ((LM_DEBUG, "JAWS: Error openning server\n")); return 0; } |