[ace-users] handle_read_stream never be call

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Fri Aug 31 21:20:33 CDT 2007


Hi,

To ensure that we have proper version/platform/compiler
information, please make sure you fill out the appropriate problem
report form (PRF), which is in

$ACE_ROOT/PROBLEM-REPORT-FORM
$TAO_ROOT/PROBLEM-REPORT-FORM

or in

$ACE_ROOT/BUG-REPORT-FORM
$TAO_ROOT/BUG-REPORT-FORM

in older versions of ACE+TAO.  Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness.  If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers
to.

Thanks,

        Doug


>I write a web page get program.
>
>    urlget="GET  ";
>    urlget+=httpinfo.filename;
>    if(httpinfo.filename.size()<5)
>       urlget+="/index.html";
>    urlget+="  HTTP/1.1\r\nHost: ";
>    urlget+=httpinfo.hostname;
>    urlget+="\r\nConnection:close";
>    urlget+="\r\nUser-agent:Mozilla/4.0";
>    urlget+="\r\nAccept-language:zh-cn";
>     ACE_NEW_NORETURN (mb,
>                  ACE_Message_Block (urlget.c_str(),urlget.size()));
>    mb->length(urlget.size());
>    write_.write(*mb,urlget.size());
>
>
>write_ is success,handle_write_stream be call ,fine;
>
>void HTTP_read::handle_write_stream(const
>ACE_Asynch_Write_Stream::Result&result)
>{
>     if (result.success ())
>     {
>       ACE_DEBUG ((LM_DEBUG, "ace write success\n"));
>     }
>     ACE_Message_Block *mb=&result.message_block ();
>     mb->release();
>     ACE_NEW_NORETURN (mb, ACE_Message_Block (1024));
>     if (this->reader_.read (*mb, mb->space ()) ==-1)
>       {
>          ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),ACE_TEXT ("HTTP_read
>begin read")));
>          mb->release ();
>          delete this;
>          return;
>       }
>}
>
>
>reader_.read(*mb, mb->space ()) is fine.
>
>but handle_read_stream no be call .what happen?
>


-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list