#include "tao/Asynch_Queued_Message.h"#include "tao/debug.h"#include "tao/ORB_Core.h"#include "ace/OS_Memory.h"#include "ace/OS_NS_string.h"#include "ace/os_include/sys/os_uio.h"#include "ace/Log_Msg.h"#include "ace/Message_Block.h"#include "ace/Malloc_Base.h"#include "ace/High_Res_Timer.h"
Go to the source code of this file.
Functions | |
| ACE_RCSID (tao, Asynch_Queued_Message,"$Id: Asynch_Queued_Message.cpp 85406 2009-05-20 09:07:56Z johnnyw $") 1 TAO_Asynch_Queued_Message | |
| ACE_RCSID | ( | tao | , | |
| Asynch_Queued_Message | , | |||
| "$Id: Asynch_Queued_Message.cpp 85406 2009-05-20 09:07:56Z johnnyw $" | ||||
| ) |
Definition at line 13 of file Asynch_Queued_Message.cpp.
00015 : Asynch_Queued_Message.cpp 85406 2009-05-20 09:07:56Z johnnyw $") 00016 00017 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00018 00019 TAO_Asynch_Queued_Message::TAO_Asynch_Queued_Message ( 00020 const ACE_Message_Block *contents, 00021 TAO_ORB_Core *oc, 00022 ACE_Time_Value *timeout, 00023 ACE_Allocator *alloc, 00024 bool is_heap_allocated) 00025 : TAO_Queued_Message (oc, alloc, is_heap_allocated) 00026 , size_ (contents->total_length ()) 00027 , offset_ (0) 00028 , abs_timeout_ (ACE_Time_Value::zero) 00029 { 00030 if (timeout != 0)// && *timeout != ACE_Time_Value::zero) 00031 { 00032 this->abs_timeout_ = ACE_High_Res_Timer::gettimeofday_hr () + *timeout; 00033 } 00034 // @@ Use a pool for these guys!! 00035 ACE_NEW (this->buffer_, char[this->size_]); 00036 00037 size_t copy_offset = 0; 00038 for (const ACE_Message_Block *i = contents; 00039 i != 0; 00040 i = i->cont ()) 00041 { 00042 ACE_OS::memcpy (this->buffer_ + copy_offset, 00043 i->rd_ptr (), 00044 i->length ()); 00045 copy_offset += i->length (); 00046 } 00047 }
1.6.1