TAO_PortableGroup  2.4.0
Classes | Public Member Functions | Private Types | Private Attributes | List of all members
TAO_PG::UIPMC_Recv_Packet Class Reference

A MIOP packet for receiving. More...

#include <UIPMC_Transport_Recv_Packet.h>

Collaboration diagram for TAO_PG::UIPMC_Recv_Packet:
Collaboration graph
[legend]

Classes

struct  Fragment
 Fragments. More...
 

Public Member Functions

 UIPMC_Recv_Packet (void)
 Constructs a new recv packet. More...
 
 ~UIPMC_Recv_Packet (void)
 
int add_fragment (char *data, CORBA::UShort len, CORBA::ULong id, bool is_last)
 
ACE_Time_Value const & started (void) const
 
CORBA::ULong data_length (void) const
 
void copy_data (char *buf) const
 

Private Types

typedef ACE_Hash_Map_Manager< CORBA::ULong, Fragment, ACE_SYNCH_NULL_MUTEXFragments_Map
 

Private Attributes

CORBA::ULong last_fragment_id_
 The id of the last fragment. More...
 
CORBA::ULong data_length_
 The length of the data stored in all fragments. More...
 
ACE_Time_Value started_
 The time when the packet will expire. More...
 
Fragments_Map fragments_
 

Detailed Description

A MIOP packet for receiving.

Member Typedef Documentation

Constructor & Destructor Documentation

TAO_PG::UIPMC_Recv_Packet::UIPMC_Recv_Packet ( void  )

Constructs a new recv packet.

TAO_PG::UIPMC_Recv_Packet::~UIPMC_Recv_Packet ( void  )

Member Function Documentation

int TAO_PG::UIPMC_Recv_Packet::add_fragment ( char *  data,
CORBA::UShort  len,
CORBA::ULong  id,
bool  is_last 
)

Adds a new fragment to the packet and if it fails marks the packet as broken. Returns 1 if all fragments are in AND if there are no fragments with unexpected IDs. In case unexpected IDs are encountered the packet is marked as broken.

void TAO_PG::UIPMC_Recv_Packet::copy_data ( char *  buf) const

Copies fragments to buf. Caller ensures that the buf is big enough for all fragments.

CORBA::ULong TAO_PG::UIPMC_Recv_Packet::data_length ( void  ) const
ACE_Time_Value const & TAO_PG::UIPMC_Recv_Packet::started ( void  ) const

Returns the time when the first fragment was received or ACE_Time_Value::zero if the whole packet was not able to reconstruct for some reason.

Member Data Documentation

CORBA::ULong TAO_PG::UIPMC_Recv_Packet::data_length_
private

The length of the data stored in all fragments.

Fragments_Map TAO_PG::UIPMC_Recv_Packet::fragments_
private
CORBA::ULong TAO_PG::UIPMC_Recv_Packet::last_fragment_id_
private

The id of the last fragment.

ACE_Time_Value TAO_PG::UIPMC_Recv_Packet::started_
mutableprivate

The time when the packet will expire.


The documentation for this class was generated from the following files: