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

RMCast_Fragment.h

Go to the documentation of this file.
00001 // $Id: RMCast_Fragment.h,v 1.1.1.1 2001/12/04 14:33:17 chad Exp $
00002 
00003 #ifndef ACE_RMCAST_FRAGMENT_H
00004 #define ACE_RMCAST_FRAGMENT_H
00005 #include "ace/pre.h"
00006 
00007 #include "RMCast_Module.h"
00008 #include "ace/Synch.h"
00009 
00010 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00011 # pragma once
00012 #endif /* ACE_LACKS_PRAGMA_ONCE */
00013 
00014 //! Default fragment size
00015 #ifndef ACE_RMCAST_DEFAULT_FRAGMENT_SIZE
00016 # define ACE_RMCAST_DEFAULT_FRAGMENT_SIZE 1024
00017 #endif /* ACE_RMCAST_DEFAULT_FRAGMENT_SIZE */
00018 
00019 //! Fragmentation module
00020 /*!
00021  * Some transports cannot send very big messages, for example UDP
00022  * imposes a limit of 64K, and in practice the limit is even more
00023  * strict than that.
00024  * This class decomposes a message into multiple fragments, using an
00025  * application defined maximum size.
00026  */
00027 class ACE_RMCast_Export ACE_RMCast_Fragment : public ACE_RMCast_Module
00028 {
00029 public:
00030   //! Constructor
00031   ACE_RMCast_Fragment (void);
00032 
00033   //! Destructor
00034   virtual ~ACE_RMCast_Fragment (void);
00035 
00036   //! Accessor for the max_fragment size.
00037   /*! There is no modifier, the maximum fragment size is obtained
00038    *  using feedback from the lower layers (transport?)
00039    *  @@TODO We have not implemented the feedback mechanisms yet!
00040    */
00041   size_t max_fragment_size (void) const;
00042 
00043   /*!
00044    * Only data messages need fragmentation, the control messages are
00045    * all small enough for all the transports that I know about.
00046    * Well, actually for CAN-Bus (Controller Area Network), they may be
00047    * too big, because the max payload there is 8 bytes, but we don't
00048    * play with those in ACE.
00049    */
00050   virtual int data (ACE_RMCast::Data &data);
00051 
00052 private:
00053   //! Current fragment size limit
00054   size_t max_fragment_size_;
00055 };
00056 
00057 #if defined (__ACE_INLINE__)
00058 #include "RMCast_Fragment.i"
00059 #endif /* __ACE_INLINE__ */
00060 
00061 #include "ace/post.h"
00062 #endif /* ACE_RMCAST_FRAGMENT_H */

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