00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef ACE_SOCK_SEQ_ACCEPTOR_H
00017 #define ACE_SOCK_SEQ_ACCEPTOR_H
00018 
00019 #include  "ace/pre.h"
00020 
00021 #include  "ace/ACE_export.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif 
00026 
00027 #include "ace/SOCK_SEQPACK_Association.h"
00028 #include "ace/Multihomed_INET_Addr.h"
00029 
00030 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 class ACE_Time_Value;
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 class ACE_Export ACE_SOCK_SEQPACK_Acceptor : public ACE_SOCK
00046 {
00047 public:
00048   
00049 
00050   ACE_SOCK_SEQPACK_Acceptor (void);
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058   ACE_SOCK_SEQPACK_Acceptor (const ACE_Addr &local_sap,
00059                      int reuse_addr = 0,
00060                      int protocol_family = PF_UNSPEC,
00061                      int backlog = ACE_DEFAULT_BACKLOG,
00062                      int protocol = 132);
00063 
00064 
00065 
00066   ACE_SOCK_SEQPACK_Acceptor (const ACE_Multihomed_INET_Addr &local_sap,
00067                      int reuse_addr = 0,
00068                      int protocol_family = PF_UNSPEC,
00069                      int backlog = ACE_DEFAULT_BACKLOG,
00070                      int protocol = 132);
00071 
00072 
00073 
00074   ACE_SOCK_SEQPACK_Acceptor (const ACE_Addr &local_sap,
00075                      ACE_Protocol_Info *protocolinfo,
00076                      ACE_SOCK_GROUP g,
00077                      u_long flags,
00078                      int reuse_addr,
00079                      int protocol_family = PF_UNSPEC,
00080                      int backlog = ACE_DEFAULT_BACKLOG,
00081                      int protocol = 132);
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091   int open (const ACE_Addr &local_sap,
00092             int reuse_addr = 0,
00093             int protocol_family = PF_UNSPEC,
00094             int backlog = ACE_DEFAULT_BACKLOG,
00095             int protocol = 132);
00096 
00097 
00098 
00099   int open (const ACE_Multihomed_INET_Addr &local_sap,
00100             int reuse_addr = 0,
00101             int protocol_family = PF_UNSPEC,
00102             int backlog = ACE_DEFAULT_BACKLOG,
00103             int protocol = 132);
00104 
00105 
00106 
00107 
00108   int open (const ACE_Addr &local_sap,
00109             ACE_Protocol_Info *protocolinfo,
00110             ACE_SOCK_GROUP g,
00111             u_long flags,
00112             int reuse_addr,
00113             int protocol_family = PF_UNSPEC,
00114             int backlog = ACE_DEFAULT_BACKLOG,
00115             int protocol = 132);
00116 
00117 
00118   int close (void);
00119 
00120 
00121   ~ACE_SOCK_SEQPACK_Acceptor (void);
00122 
00123   
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133   int accept (ACE_SOCK_SEQPACK_Association &new_association,
00134               ACE_Addr *remote_addr = 0,
00135               ACE_Time_Value *timeout = 0,
00136               int restart = 1,
00137               int reset_new_handle = 0) const;
00138 
00139   
00140   typedef ACE_Multihomed_INET_Addr PEER_ADDR;
00141   typedef ACE_SOCK_SEQPACK_Association PEER_STREAM;
00142 
00143 
00144   void dump (void) const;
00145 
00146 
00147   ACE_ALLOC_HOOK_DECLARE;
00148 
00149 protected:
00150 
00151 
00152   int shared_accept_start (ACE_Time_Value *timeout,
00153                            int restart,
00154                            int &in_blocking_mode) const;
00155 
00156 
00157 
00158   int shared_accept_finish (ACE_SOCK_SEQPACK_Association new_association,
00159                             int in_blocking_mode,
00160                             int reset_new_handle) const;
00161 
00162 
00163 
00164 
00165 
00166 
00167   int shared_open (const ACE_Addr &local_sap,
00168                    int protocol_family,
00169                    int backlog);
00170 
00171 
00172 
00173   int shared_open (const ACE_Multihomed_INET_Addr &local_sap,
00174                    int protocol_family,
00175                    int backlog);
00176 
00177 private:
00178 
00179   int get_remote_addr (ACE_Addr &) const;
00180 };
00181 
00182 ACE_END_VERSIONED_NAMESPACE_DECL
00183 
00184 #if defined (__ACE_INLINE__)
00185 #include "ace/SOCK_SEQPACK_Acceptor.inl"
00186 #endif 
00187 
00188 #include  "ace/post.h"
00189 
00190 #endif