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

RMCast_UDP_Proxy.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: RMCast_UDP_Proxy.h,v 1.1.1.2 2003/02/21 18:36:32 chad Exp $
00003 
00004 // ============================================================================
00005 //
00006 // = LIBRARY
00007 //    ace
00008 //
00009 // = FILENAME
00010 //    RMCast_UDP_Proxy.h
00011 //
00012 // = AUTHOR
00013 //    Carlos O'Ryan <coryan@uci.edu>
00014 //
00015 // ============================================================================
00016 
00017 #ifndef ACE_RMCAST_UDP_PROXY_H
00018 #define ACE_RMCAST_UDP_PROXY_H
00019 #include "ace/pre.h"
00020 
00021 #include "RMCast_Proxy.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/INET_Addr.h"
00028 
00029 class ACE_RMCast_IO_UDP;
00030 
00031 /// Define the proxy implementation for UDP based communication
00032 /**
00033  * Proxy objects are transport specific, they are responsible for
00034  * storing the remote peer addressing information.
00035  * This class implements the UDP version of a proxy.
00036  */
00037 class ACE_RMCast_Export ACE_RMCast_UDP_Proxy : public ACE_RMCast_Proxy
00038 {
00039 public:
00040   /// Constructor
00041   /**
00042    * The \param io_udp argument is kept to send the replys through the
00043    * right socket.
00044    * The \param peer_addr is the address used byu the peer to receive
00045    * responses.
00046    */
00047   ACE_RMCast_UDP_Proxy (ACE_RMCast_IO_UDP *io_udp,
00048                         const ACE_INET_Addr &peer_addr);
00049 
00050   /// Destructor
00051   virtual ~ACE_RMCast_UDP_Proxy (void);
00052 
00053   /// Receive a message, parse and send it upstream in the right
00054   /// format.
00055   int receive_message (char *buffer, size_t size);
00056 
00057   /// Make the peer address available
00058   const ACE_INET_Addr &peer_addr (void) const;
00059 
00060   //@{
00061   /**
00062    * Implement the ACE_RMCast_Proxy methods, in this case we use the
00063    * @var io_udp_ object to send the data, using the address of our
00064    * remote peer.
00065    */
00066   virtual int reply_data (ACE_RMCast::Data &);
00067   virtual int reply_poll (ACE_RMCast::Poll &);
00068   virtual int reply_ack_join (ACE_RMCast::Ack_Join &);
00069   virtual int reply_ack_leave (ACE_RMCast::Ack_Leave &);
00070   virtual int reply_ack (ACE_RMCast::Ack &);
00071   virtual int reply_join (ACE_RMCast::Join &);
00072   virtual int reply_leave (ACE_RMCast::Leave &);
00073   //@}
00074 
00075 private:
00076   /// The IO facade
00077   ACE_RMCast_IO_UDP *io_udp_;
00078 
00079   /// The remote peer's address
00080   ACE_INET_Addr peer_addr_;
00081 };
00082 
00083 #if defined (__ACE_INLINE__)
00084 #include "RMCast_UDP_Proxy.i"
00085 #endif /* __ACE_INLINE__ */
00086 
00087 #include "ace/post.h"
00088 #endif /* ACE_RMCAST_UDP_PROXY_H */

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