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

RMCast_Proxy.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: RMCast_Proxy.h,v 1.1.1.1 2001/12/04 14:33:17 chad Exp $
00003 
00004 // ============================================================================
00005 //
00006 // = LIBRARY
00007 //    ace
00008 //
00009 // = FILENAME
00010 //    RMCast_Proxy.h
00011 //
00012 // = AUTHOR
00013 //    Carlos O'Ryan <coryan@uci.edu>
00014 //
00015 // ============================================================================
00016 
00017 #ifndef ACE_RMCAST_PROXY_H
00018 #define ACE_RMCAST_PROXY_H
00019 #include "ace/pre.h"
00020 
00021 #include "RMCast_Module.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 class ACE_Message_Block;
00028 class ACE_Time_Value;
00029 
00030 //! Local representation for remote peers
00031 /*!
00032   Both senders and receivers in the multicast group need to maintain
00033   explicit representations of their "peers".  For example, a sender
00034   needs to know the list of all the receivers and what messages they
00035   have reported as successfully received.
00036   Likewise, the receiver needs to maintain separate state for each
00037   remote sender, and must be able to disconnect from all of them
00038   gracefully when needed.
00039   The RMCast_Proxy class is an opaque representation of such a peer,
00040   and hides all the networking details from the rest of the system.
00041 */
00042 class ACE_RMCast_Export ACE_RMCast_Proxy : public ACE_RMCast_Module
00043 {
00044 public:
00045   //! Constructor
00046   ACE_RMCast_Proxy (void);
00047   // Constructor
00048 
00049   //! Destructor
00050   virtual ~ACE_RMCast_Proxy (void);
00051 
00052   //! Return the next sequence number expected by the peer. Only
00053   //! applies to remote receiver proxies.
00054   /*!
00055    * Please read the documentation in ACE_RMCast::Ack
00056    */
00057   virtual ACE_UINT32 next_expected (void) const;
00058 
00059   //! Return the highest sequence number successfully received.
00060   //! Only applies to remote receiver proxies.
00061   /*!
00062    * Please read the documentation in ACE_RMCast::Ack
00063    */
00064   virtual ACE_UINT32 highest_received (void) const;
00065 
00066   //@{
00067   //! Send messages directly to the peer.
00068   /*!
00069    * Send a message directly to the peer, i.e. the message is not
00070    * sent through the multicast group and it may not be processed by
00071    * all the layers in the stack.
00072    */
00073   virtual int reply_data (ACE_RMCast::Data &) = 0;
00074   virtual int reply_poll (ACE_RMCast::Poll &) = 0;
00075   virtual int reply_ack_join (ACE_RMCast::Ack_Join &);
00076   virtual int reply_ack_leave (ACE_RMCast::Ack_Leave &) = 0;
00077   virtual int reply_ack (ACE_RMCast::Ack &) = 0;
00078   virtual int reply_join (ACE_RMCast::Join &) = 0;
00079   virtual int reply_leave (ACE_RMCast::Leave &) = 0;
00080   //@}
00081 
00082   /*!
00083    * Proxies process the ACK sequence numbers to cache the ack
00084    * information from the peer.
00085    */
00086   virtual int ack (ACE_RMCast::Ack &);
00087 
00088 private:
00089   //@{
00090   //! Cache the sequence numbers reported from the remote peer using
00091   //! Ack messages
00092   ACE_UINT32 next_expected_;
00093   ACE_UINT32 highest_received_;
00094   //@}
00095 };
00096 
00097 #if defined (__ACE_INLINE__)
00098 #include "RMCast_Proxy.i"
00099 #endif /* __ACE_INLINE__ */
00100 
00101 #include "ace/post.h"
00102 #endif /* ACE_RMCAST_PROXY_H */

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