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 namespace OpenDDS { 00017 namespace DCPS { 00018 00019 class TcpInst; 00020 00021 class TcpAcceptor : public ACE_Acceptor<TcpConnection, 00022 ACE_SOCK_ACCEPTOR> { 00023 public: 00024 00025 TcpAcceptor(TcpTransport* transport_impl); 00026 virtual ~TcpAcceptor(); 00027 00028 // Returns a reference that the caller becomes responsible for. 00029 TcpTransport* transport(); 00030 00031 // This causes the Acceptor to drop its reference to the 00032 // TcpTransport object. 00033 void transport_shutdown(); 00034 00035 TcpInst* get_configuration(); 00036 00037 private: 00038 00039 TcpTransport_rch transport_; 00040 }; 00041 00042 } // namespace DCPS 00043 } // namespace OpenDDS 00044 00045 #endif /* OPENDDS_TCPACCEPTOR_H */