00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_TCPACCEPTOR_H 00009 #define OPENDDS_TCPACCEPTOR_H 00010 00011 #include "TcpTransport_rch.h" 00012 #include "TcpConnection.h" 00013 #include "ace/Acceptor.h" 00014 #include "ace/SOCK_Acceptor.h" 00015 00016 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00017 00018 namespace OpenDDS { 00019 namespace DCPS { 00020 00021 class TcpInst; 00022 00023 class TcpAcceptor : public ACE_Acceptor<TcpConnection, 00024 ACE_SOCK_ACCEPTOR> { 00025 public: 00026 00027 TcpAcceptor(TcpTransport* transport_impl); 00028 virtual ~TcpAcceptor(); 00029 00030 // Returns a reference that the caller becomes responsible for. 00031 TcpTransport* transport(); 00032 00033 // This causes the Acceptor to drop its reference to the 00034 // TcpTransport object. 00035 void transport_shutdown(); 00036 00037 TcpInst& get_configuration(); 00038 00039 private: 00040 00041 TcpTransport* transport_; 00042 }; 00043 00044 } // namespace DCPS 00045 } // namespace OpenDDS 00046 00047 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00048 00049 #endif /* OPENDDS_TCPACCEPTOR_H */