XTI_ATM_Mcast.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    XTI_ATM_Mcast.h
00006  *
00007  *  XTI_ATM_Mcast.h,v 4.9 2005/10/28 23:55:10 ossama Exp
00008  *
00009  *  @author Joe Hoffert
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_XTI_ATM_MCAST_H
00015 #define ACE_XTI_ATM_MCAST_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/config-all.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #if defined (ACE_HAS_XTI_ATM)
00025 
00026 #include "ace/TLI_Connector.h"
00027 #include "ace/ATM_Addr.h"
00028 
00029 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 /**
00032  * @class ACE_XTI_ATM_Mcast
00033  *
00034  * @brief Defines an active connection factory for the ACE_TLI C++
00035  * wrappers to support XTI/ATM multicast.
00036  */
00037 class ACE_Export ACE_XTI_ATM_Mcast : public ACE_TLI_Connector
00038 {
00039 public:
00040   // = Initialization methods.
00041   /// Default constructor.
00042   ACE_XTI_ATM_Mcast (void);
00043 
00044   /**
00045    * Actively connect and produce a <new_stream> if things go well.
00046    * The <remote_sap> is the address that we are trying to connect
00047    * with.  The <timeout> is the amount of time to wait to connect.
00048    * If it's 0 then we block indefinitely.  If *timeout == {0, 0} then
00049    * the connection is done using non-blocking mode.  In this case, if
00050    * the connection can't be made immediately the value of -1 is
00051    * returned with <errno == EWOULDBLOCK>.  If *timeout > {0, 0} then
00052    * this is the amount of time to wait before timing out.  If the
00053    * time expires before the connection is made <errno == ETIME>.  The
00054    * <local_sap> is the value of local address to bind to.  If it's
00055    * the default value of <ACE_Addr::sap_any> then the user is letting
00056    * the OS do the binding.  If <reuse_addr> == 1 then the
00057    * <local_addr> is reused, even if it hasn't been cleanedup yet.
00058    */
00059   ACE_XTI_ATM_Mcast (ACE_TLI_Stream &new_stream,
00060                      const ACE_Addr &remote_sap,
00061                      ACE_Time_Value *timeout = 0,
00062                      const ACE_Addr &local_sap = ACE_Addr::sap_any,
00063                      int reuse_addr = 0,
00064                      int flags = O_RDWR,
00065                      int perms = 0,
00066                      const char device[] = ACE_XTI_ATM_DEVICE,
00067                      struct t_info *info = 0,
00068                      int rw_flag = 1,
00069                      struct netbuf *udata = 0,
00070                      struct netbuf *opt = 0);
00071 
00072   /**
00073    * Actively connect and produce a <new_stream> if things go well.
00074    * The <remote_sap> is the address that we are trying to connect
00075    * with.  The <timeout> is the amount of time to wait to connect.
00076    * If it's 0 then we block indefinitely.  If *timeout == {0, 0} then
00077    * the connection is done using non-blocking mode.  In this case, if
00078    * the connection can't be made immediately the value of -1 is
00079    * returned with <errno == EWOULDBLOCK>.  If *timeout > {0, 0} then
00080    * this is the amount of time to wait before timing out.  If the
00081    * time expires before the connection is made <errno == ETIME>.  The
00082    * <local_sap> is the value of local address to bind to.  If it's
00083    * the default value of <ACE_Addr::sap_any> then the user is letting
00084    * the OS do the binding.  If <reuse_addr> == 1 then the
00085    * <local_addr> is reused, even if it hasn't been cleanedup yet.
00086    */
00087   int connect (ACE_TLI_Stream &new_stream,
00088                const ACE_Addr &remote_sap,
00089                ACE_Time_Value *timeout = 0,
00090                const ACE_Addr &local_sap = ACE_Addr::sap_any,
00091                int reuse_addr = 0,
00092                int flags = O_RDWR,
00093                int perms = 0,
00094                const char device[] = ACE_XTI_ATM_DEVICE,
00095                struct t_info *info = 0,
00096                int rw_flag = 1,
00097                struct netbuf *udata = 0,
00098                struct netbuf *opt = 0);
00099 
00100   /**
00101    * Actively add a leaf to the currently connected stream (i.e.,
00102    * multicast). The <remote_sap> is the address of the leaf that we
00103    * are trying to add. The <timeout> is the amount of time to wait to
00104    * connect. If it's 0 then we block indefinitely.  If *timeout ==
00105    * {0, 0} then the connection is done using non-blocking mode.  In
00106    * this case, if the connection can't be made immediately the value
00107    * of -1 is returned with <errno == EWOULDBLOCK>.  If *timeout >
00108    * {0, 0} then this is the amount of time to wait before timing out.
00109    * If the time expires before the connection is made <errno == ETIME>.
00110    */
00111   int add_leaf (ACE_TLI_Stream &current_stream,
00112                 const ACE_Addr &remote_sap,
00113                 ACE_INT32 leaf_id,
00114                 ACE_Time_Value *timeout = 0);
00115 
00116   // = Meta-type info
00117   typedef ACE_ATM_Addr PEER_ADDR;
00118   typedef ACE_TLI_Stream PEER_STREAM;
00119 
00120   /// Dump the state of an object.
00121   void dump (void) const;
00122 
00123   /// Declare the dynamic allocation hooks.
00124   ACE_ALLOC_HOOK_DECLARE;
00125 };
00126 
00127 ACE_END_VERSIONED_NAMESPACE_DECL
00128 
00129 #if defined (__ACE_INLINE__)
00130 #include "ace/XTI_ATM_Mcast.inl"
00131 #endif /* __ACE_INLINE__ */
00132 
00133 #endif /* ACE_HAS_XTI_ATM */
00134 
00135 #include /**/ "ace/post.h"
00136 
00137 #endif /* ACE_XTI_ATM_MCAST_H */

Generated on Thu Nov 9 09:42:10 2006 for ACE by doxygen 1.3.6