Transport.cpp File Reference

#include "tao/Transport.h"
#include "tao/LF_Follower.h"
#include "tao/Leader_Follower.h"
#include "tao/Client_Strategy_Factory.h"
#include "tao/Wait_Strategy.h"
#include "tao/Transport_Mux_Strategy.h"
#include "tao/Stub.h"
#include "tao/Transport_Queueing_Strategies.h"
#include "tao/Connection_Handler.h"
#include "tao/GIOP_Message_Base.h"
#include "tao/Synch_Queued_Message.h"
#include "tao/Asynch_Queued_Message.h"
#include "tao/Flushing_Strategy.h"
#include "tao/Thread_Lane_Resources.h"
#include "tao/Resume_Handle.h"
#include "tao/Codeset_Manager.h"
#include "tao/Codeset_Translator_Base.h"
#include "tao/debug.h"
#include "tao/CDR.h"
#include "tao/ORB_Core.h"
#include "tao/MMAP_Allocator.h"
#include "tao/SystemException.h"
#include "ace/OS_NS_sys_time.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Reactor.h"
#include "ace/os_include/sys/os_uio.h"
#include "ace/High_Res_Timer.h"
#include "ace/Countdown_Time.h"
#include "ace/CORBA_macros.h"
#include "tao/Transport.inl"

Include dependency graph for Transport.cpp:

Go to the source code of this file.

Functions

static void dump_iov (iovec *iov, int iovcnt, size_t id, size_t current_transfer, const char *location)


Function Documentation

static void dump_iov ( iovec *  iov,
int  iovcnt,
size_t  id,
size_t  current_transfer,
const char *  location 
) [static]

Definition at line 54 of file Transport.cpp.

References ACE_DEBUG, ACE_HEX_DUMP, ACE_SIZE_T_FORMAT_SPECIFIER, ACE_TEXT, ACE_TEXT_CHAR_TO_TCHAR, ACE_Log_Msg::instance(), LM_DEBUG, and ACE_OS::sprintf().

Referenced by TAO_Transport::drain_queue_helper().

00057 {
00058   ACE_Guard <ACE_Log_Msg> log_guard (*ACE_Log_Msg::instance ());
00059 
00060   ACE_DEBUG ((LM_DEBUG,
00061               ACE_TEXT ("TAO (%P|%t) - Transport[%d]::%s, ")
00062               ACE_TEXT ("sending %d buffers\n"),
00063               id, ACE_TEXT_CHAR_TO_TCHAR (location), iovcnt));
00064 
00065   for (int i = 0; i != iovcnt && 0 < current_transfer; ++i)
00066     {
00067       size_t iov_len = iov[i].iov_len;
00068 
00069       // Possibly a partially sent iovec entry.
00070       if (current_transfer < iov_len)
00071         {
00072           iov_len = current_transfer;
00073         }
00074 
00075       ACE_DEBUG ((LM_DEBUG,
00076                   ACE_TEXT ("TAO (%P|%t) - Transport[%d]::%s, ")
00077                   ACE_TEXT ("buffer %d/%d has %d bytes\n"),
00078                   id, ACE_TEXT_CHAR_TO_TCHAR(location),
00079                   i, iovcnt,
00080                   iov_len));
00081 
00082       size_t len;
00083 
00084       for (size_t offset = 0; offset < iov_len; offset += len)
00085         {
00086           ACE_TCHAR header[1024];
00087           ACE_OS::sprintf (header,
00088                            ACE_TEXT("TAO - ")
00089                            ACE_TEXT("Transport[")
00090                            ACE_SIZE_T_FORMAT_SPECIFIER
00091                            ACE_TEXT("]::%s")
00092                            ACE_TEXT(" (")
00093                            ACE_SIZE_T_FORMAT_SPECIFIER ACE_TEXT("/")
00094                            ACE_SIZE_T_FORMAT_SPECIFIER ACE_TEXT(")"),
00095                            id, location, offset, iov_len);
00096 
00097           len = iov_len - offset;
00098 
00099           if (len > 512)
00100             {
00101               len = 512;
00102             }
00103 
00104           ACE_HEX_DUMP ((LM_DEBUG,
00105                          static_cast<char*> (iov[i].iov_base) + offset,
00106                          len,
00107                          header));
00108         }
00109       current_transfer -= iov_len;
00110     }
00111 
00112   ACE_DEBUG ((LM_DEBUG,
00113               ACE_TEXT ("TAO (%P|%t) - Transport[%d]::%s, ")
00114               ACE_TEXT ("end of data\n"),
00115               id, ACE_TEXT_CHAR_TO_TCHAR(location)));
00116 }


Generated on Tue Feb 2 17:39:00 2010 for TAO by  doxygen 1.4.7