[ace-users] mb->rd_ptr
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Fri Sep 14 08:51:24 CDT 2007
Hi Joe,
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.
>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()));
No, this shoudln't be strictly necessary for your particular usecase!
Thanks,
Doug
--
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