[Ace-users] mb->rd_ptr
joe
joelihn at hotmail.com
Fri Sep 14 03:12:43 CDT 2007
int C_SENDTO_R_MESSAGE_Task_Worker::svc(void) {
while (1) {
//ACE_Message_Block
ACE_Message_Block *mb;
if (this->getq(mb) == -1) {
ACE_ERROR_BREAK
((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT
("C_SENDTO_R_MESSAGE_Task_Worker getq")));
}
ssize_t rec(0);
rec = ::g_stream_sock().send_n(mb->rd_ptr(), mb->length());
//?
mb->rd_ptr(static_cast<size_t> (mb->length()));
//look out, delete
mb->release();
}
return 0;
}
do i need this line:
mb->rd_ptr(static_cast<size_t> (mb->length()));
More information about the Ace-users
mailing list