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

ATM_Acceptor.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ATM_Acceptor.h
00006  *
00007  *  $Id: ATM_Acceptor.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_ATM_ACCEPTOR_H
00015 #define ACE_ATM_ACCEPTOR_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_ATM)
00025 
00026 #include "ace/Time_Value.h"
00027 #include "ace/ATM_Stream.h"
00028 #include "ace/ATM_Params.h"
00029 #include "ace/ATM_QoS.h"
00030 
00031 #if defined (ACE_HAS_LINUX_ATM)
00032 #include /**/ "atm.h"
00033 #endif /* ACE_HAS_LINUX_ATM */
00034 
00035 #if defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM)
00036 #include "SOCK_Acceptor.h"
00037 typedef ACE_SOCK_Acceptor ATM_Acceptor;
00038 #elif defined (ACE_HAS_FORE_ATM_XTI)
00039 #include "TLI_Acceptor.h"
00040 typedef ACE_TLI_Acceptor ATM_Acceptor;
00041 #endif // ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM
00042 
00043 /**
00044  * @class ACE_ATM_Acceptor
00045  *
00046  * @brief Defines the member functions for ACE_ATM_Acceptor abstraction.
00047  *
00048  * This class wraps up the ACE_SOCK_Acceptor and ACE_TLI_Acceptor
00049  * to make the mechanism for the ATM protocol transparent.
00050  */
00051 class ACE_Export ACE_ATM_Acceptor
00052 {
00053 
00054 public:
00055   // = Initialization and termination methods.
00056   /// Default constructor.
00057   ACE_ATM_Acceptor (void);
00058 
00059   ~ACE_ATM_Acceptor ();
00060 
00061   /// Initiate a passive mode connection.
00062   ACE_ATM_Acceptor (const ACE_Addr &remote_sap,
00063                     int backlog = ACE_DEFAULT_BACKLOG,
00064                     ACE_ATM_Params params = ACE_ATM_Params());
00065 
00066   /// Initiate a passive mode socket.
00067   ACE_HANDLE open (const ACE_Addr &remote_sap,
00068                    int backlog = ACE_DEFAULT_BACKLOG,
00069                    ACE_ATM_Params params = ACE_ATM_Params());
00070 
00071   /// Close down the acceptor and release resources.
00072   int close (void);
00073 
00074   // = Passive connection acceptance method.
00075 
00076   /// Accept a new data transfer connection.  A <timeout> of 0 means
00077   /// block forever, a <timeout> of {0, 0} means poll.  <restart> == 1
00078   /// means "restart if interrupted."
00079   int accept (ACE_ATM_Stream &new_sap,
00080               ACE_Addr *remote_addr = 0,
00081               ACE_Time_Value *timeout = 0,
00082               int restart = 1,
00083               int reset_new_handle = 0,
00084               ACE_ATM_Params params = ACE_ATM_Params(),
00085               ACE_ATM_QoS qos = ACE_ATM_QoS());
00086 
00087   /// Get the local address currently listening on
00088   int get_local_addr( ACE_ATM_Addr &local_addr );
00089 
00090   // = Meta-type info
00091   typedef ACE_ATM_Addr PEER_ADDR;
00092   typedef ACE_ATM_Stream PEER_STREAM;
00093 
00094   /// Dump the state of an object.
00095   void dump (void) const;
00096 
00097   /// Declare the dynamic allocation hooks.
00098   ACE_ALLOC_HOOK_DECLARE;
00099 
00100 private:
00101   ATM_Acceptor acceptor_;
00102 };
00103 
00104 #if defined (__ACE_INLINE__)
00105 #include "ace/ATM_Acceptor.i"
00106 #endif /* __ACE_INLINE__ */
00107 
00108 #endif /* ACE_HAS_ATM */
00109 #include "ace/post.h"
00110 #endif /* ACE_ATM_ACCEPTOR_H */

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