Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

RMCast_Reassembly.h

Go to the documentation of this file.
00001 // $Id: RMCast_Reassembly.h,v 1.1.1.1 2001/12/04 14:33:17 chad Exp $
00002 
00003 // ============================================================================
00004 //
00005 // = DESCRIPTION
00006 //   The reassembly task for the reliable multicast library
00007 //
00008 // = AUTHOR
00009 //    Carlos O'Ryan <coryan@uci.edu>
00010 //
00011 // ============================================================================
00012 
00013 #ifndef ACE_RMCAST_REASSEMBLY_H
00014 #define ACE_RMCAST_REASSEMBLY_H
00015 #include "ace/pre.h"
00016 
00017 #include "RMCast_Module.h"
00018 #include "ace/Hash_Map_Manager.h"
00019 #include "ace/Synch.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 class ACE_RMCast_Partial_Message;
00026 
00027 //! Reassemble multiple data fragments into a single data message
00028 /*!
00029   Data messages may not fit in a single MTU in the transport layer, in
00030   that case the application configure a RMCast_Fragment module on the
00031   sender side.  On the receiver side this layer reassemble the
00032   messages sent from a <EM>single</EM> source, and passes the messages
00033   up the stream.
00034 */
00035 class ACE_RMCast_Export ACE_RMCast_Reassembly : public ACE_RMCast_Module
00036 {
00037 public:
00038   //! Constructor
00039   ACE_RMCast_Reassembly (void);
00040 
00041   //! Destructor
00042   virtual ~ACE_RMCast_Reassembly (void);
00043 
00044   // = The ACE_RMCast_Module methods
00045   virtual int close (void);
00046   virtual int data (ACE_RMCast::Data &data);
00047 
00048 private:
00049   /// Cleanup resources, but do not close the other modules in the
00050   /// stack
00051   void close_i (void);
00052 
00053 private:
00054   //! A mutex used to synchronize all the internal operations.
00055   ACE_SYNCH_MUTEX mutex_;
00056   typedef
00057       ACE_Hash_Map_Manager<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Null_Mutex>
00058       Message_Map;
00059   typedef
00060       ACE_Hash_Map_Iterator<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Null_Mutex>
00061       Message_Map_Iterator;
00062 
00063   //! A map, indexed by sequence number, of the partially received
00064   //! messages.
00065   Message_Map messages_;
00066 };
00067 
00068 #if defined (__ACE_INLINE__)
00069 #include "RMCast_Reassembly.i"
00070 #endif /* __ACE_INLINE__ */
00071 
00072 #include "ace/post.h"
00073 #endif /* ACE_RMCAST_REASSEMBLY_H */

Generated on Mon Jun 16 13:12:37 2003 for ACE_RMCast by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002