[Ace-users] handle_read_stream never be call
FE
blood_yan at sina.com.cn
Fri Aug 31 19:51:42 CDT 2007
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?
More information about the Ace-users
mailing list