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

XTI_ATM_Mcast.h

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

Generated on Mon Jun 16 11:22:12 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002