summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorjxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-05 10:43:18 +0000
committerjxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-05 10:43:18 +0000
commit7ab457acecec5486e81f068936c7f5f7e917ee64 (patch)
tree714131e1ce14697cd2e373ceeae329eeb99e82dc /apps
parentfbd35e2de514f40de668dfa05e8cc5e3fc4473a0 (diff)
downloadATCD-7ab457acecec5486e81f068936c7f5f7e917ee64.tar.gz
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r--apps/JAWS/PROTOTYPE/HTTP_10_Parse.cpp2
-rw-r--r--apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp6
-rw-r--r--apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp38
-rw-r--r--apps/JAWS/PROTOTYPE/JAWS/IO_Handler.h8
4 files changed, 38 insertions, 16 deletions
diff --git a/apps/JAWS/PROTOTYPE/HTTP_10_Parse.cpp b/apps/JAWS/PROTOTYPE/HTTP_10_Parse.cpp
index c055e2b97ce..de87d6ebfce 100644
--- a/apps/JAWS/PROTOTYPE/HTTP_10_Parse.cpp
+++ b/apps/JAWS/PROTOTYPE/HTTP_10_Parse.cpp
@@ -24,6 +24,8 @@ JAWS_HTTP_10_Parse_Task::handle_put (JAWS_Data_Block *data, ACE_Time_Value *)
{
JAWS_TRACE ("JAWS_HTTP_10_Parse_Task::handle_put");
+cerr << "************* Message block in parse: " << data << endl;
+
JAWS_IO_Handler *handler = data->io_handler ();
JAWS_Dispatch_Policy *policy = this->policy ();
if (policy == 0) policy = data->policy ();
diff --git a/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp b/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp
index 50b902738d4..1d669cf7ad0 100644
--- a/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp
+++ b/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp
@@ -33,7 +33,7 @@ JAWS_IO_Acceptor::accept (ACE_SOCK_Stream &, ACE_Addr *, ACE_Time_Value *,
}
int
-JAWS_IO_Acceptor::accept (size_t)
+JAWS_IO_Acceptor::accept (size_t, const void *)
{
return -1;
}
@@ -76,7 +76,7 @@ JAWS_IO_Synch_Acceptor::accept (ACE_SOCK_Stream &new_stream,
}
int
-JAWS_IO_Synch_Acceptor::accept (size_t)
+JAWS_IO_Synch_Acceptor::accept (size_t, const void *)
{
return -1;
}
@@ -152,7 +152,7 @@ ACE_HANDLE
JAWS_IO_Asynch_Acceptor::get_handle (void)
{
#if defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)
- return this->handle_;
+ return this->acceptor_.get_handle ();
#else
return ACE_INVALID_HANDLE;
#endif /* defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS) */
diff --git a/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp b/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp
index 9ff29e87d64..dd1e222ce11 100644
--- a/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp
+++ b/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp
@@ -50,7 +50,7 @@ JAWS_IO_Handler::JAWS_IO_Handler (JAWS_IO_Handler_Factory *factory)
task_ (0),
factory_ (factory)
#if defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)
- , handler_ (this)
+ , handler_ (0)
#endif /* defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS) */
{
}
@@ -158,7 +158,7 @@ JAWS_IO_Handler::factory (void)
}
ACE_HANDLE
-JAWS_IO_Handler::handle (void)
+JAWS_IO_Handler::handle (void) const
{
return this->handle_;
}
@@ -204,11 +204,11 @@ JAWS_IO_Handler::status (void)
ACE_Handler *
JAWS_IO_Handler::handler (void)
{
- return &this->handler_;
+ return this->handler_;
}
-JAWS_Asynch_Handler::JAWS_Asynch_Handler (JAWS_IO_Handler *ioh)
- : ioh_ (ioh)
+JAWS_Asynch_Handler::JAWS_Asynch_Handler (void)
+ : ioh_ (0)
{
this->proactor (ACE_Proactor::instance ());
}
@@ -221,18 +221,36 @@ void
JAWS_Asynch_Handler::open (ACE_HANDLE h,
ACE_Message_Block &mb)
{
+ // This currently does nothing, but just in case.
+ ACE_Service_Handler::open (h, mb);
+
// ioh_ set from the ACT hopefully
- this->dispatch_handler ();
+ //this->dispatch_handler ();
+
+ this->handler ()->mb_->crunch ();
+ if (mb.rd_ptr ()[0] != '\0')
+ this->handler ()->mb_->copy (mb.rd_ptr (), mb.length ());
+ ACE_Message_Block &mb2 = *(this->handler ()->mb_);
+ ACE_Asynch_Accept::Result fake_result
+ (*this, JAWS_IO_Asynch_Acceptor_Singleton::instance ()->get_handle (),
+ h, mb2, JAWS_Data_Block::JAWS_DATA_BLOCK_SIZE,
+ this->ioh_, ACE_INVALID_HANDLE);
- this->handler ()->mb_->copy (mb.rd_ptr (), mb.length ());
- this->handler ()->accept_complete (h);
+ this->handler ()->handler_ = this;
+ this->handle_accept (fake_result);
}
void
JAWS_Asynch_Handler::act (const void *act_ref)
{
// Set the ioh from the act
- this->ioh_ = (JAWS_IO_Handler *) act;
+ this->ioh_ = (JAWS_IO_Handler *) act_ref;
+}
+
+ACE_HANDLE
+JAWS_Asynch_Handler::handle (void) const
+{
+ return this->ioh_->handle ();
}
void
@@ -258,6 +276,7 @@ void
JAWS_Asynch_Handler::handle_read_stream (const ACE_Asynch_Read_Stream::Result
&result)
{
+ JAWS_TRACE ("JAWS_Asynch_Handler::handle_read_stream");
this->dispatch_handler ();
@@ -342,7 +361,6 @@ JAWS_Asynch_Handler::handle_transmit_file (const
void
JAWS_Asynch_Handler::handle_accept (const ACE_Asynch_Accept::Result &result)
{
- // This routine is never actually called.
this->dispatch_handler ();
if (result.success ())
diff --git a/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.h b/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.h
index 252f4bf5dc7..c41855905d9 100644
--- a/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.h
+++ b/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.h
@@ -106,7 +106,7 @@ public:
virtual JAWS_IO_Handler_Factory *factory (void) = 0;
// Returns the factory for this IO handler
- virtual ACE_HANDLE handle (void) = 0;
+ virtual ACE_HANDLE handle (void) const = 0;
// Returns the socket handle for this handler
virtual void done (void) = 0;
@@ -118,7 +118,7 @@ public:
};
#if defined(ACE_WIN32) || defined(ACE_HAS_AIO_CALLS)
-class JAWS_Export JAWS_Asynch_Handler : public ACE_Handler //, public ACE_Service_Handler
+class JAWS_Export JAWS_Asynch_Handler : public ACE_Service_Handler
{
public:
JAWS_Asynch_Handler (void);
@@ -153,6 +153,8 @@ public:
virtual void act (const void *act_ref);
// Receives the ACT.
+ virtual ACE_HANDLE handle (void) const;
+
private:
JAWS_IO_Handler *ioh_;
};
@@ -184,7 +186,7 @@ public:
virtual void error_message_complete (void);
virtual JAWS_IO_Handler_Factory *factory (void);
- virtual ACE_HANDLE handle (void);
+ virtual ACE_HANDLE handle (void) const;
virtual void done (void);
virtual int status (void);