5 #include "JAWS/IO_Handler.h"
6 #include "JAWS/Policy.h"
10 // --------------- READ TASK ----------------------
12 JAWS_HTTP_10_Read_Task::JAWS_HTTP_10_Read_Task (void)
16 JAWS_HTTP_10_Read_Task::~JAWS_HTTP_10_Read_Task (void)
21 JAWS_HTTP_10_Read_Task::handle_put (JAWS_Data_Block
*data
, ACE_Time_Value
*)
23 JAWS_TRACE ("JAWS_HTTP_10_Read_Task::handle_put");
25 JAWS_IO_Handler
*handler
= data
->io_handler ();
26 JAWS_Dispatch_Policy
*policy
= this->policy ();
27 if (policy
== 0) policy
= data
->policy ();
29 JAWS_IO
*io
= policy
->io ();
31 if (data
->length () > 0)
33 if (data
->rd_ptr ()[0] != '\0')
35 JAWS_TRACE ("JAWS_HTTP_10_Read_Task::handle_put, have data");
39 data
->rd_ptr (data
->wr_ptr ());
42 io
->read (handler
, data
, data
->size ());
43 switch (handler
->status ())
45 case JAWS_IO_Handler::READ_OK
:
47 JAWS_TRACE ("JAWS_HTTP_10_Read_Task::handle_put, READ_OK");
51 case JAWS_IO_Handler::READ_ERROR
:
52 case JAWS_IO_Handler::READ_ERROR_A
:
54 JAWS_TRACE ("JAWS_HTTP_10_Read_Task::handle_put, READ_ERROR");