diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
commit | a5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch) | |
tree | bcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/UPIPE_Acceptor.h | |
download | ATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz |
Initial revision
Diffstat (limited to 'ace/UPIPE_Acceptor.h')
-rw-r--r-- | ace/UPIPE_Acceptor.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/ace/UPIPE_Acceptor.h b/ace/UPIPE_Acceptor.h new file mode 100644 index 00000000000..b855285f76e --- /dev/null +++ b/ace/UPIPE_Acceptor.h @@ -0,0 +1,81 @@ +/* -*- C++ -*- */ +// $Id$ + + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// UPIPE_Acceptor.h +// +// = AUTHOR +// Gerhard Lenzer and Douglas C. Schmidt +// +// ============================================================================ + +#if !defined (ACE_UPIPE_ACCEPTOR_H) +#define ACE_UPIPE_ACCEPTOR_H + +#include "ace/UPIPE_Stream.h" +#include "ace/Synch.h" +#include "ace/SPIPE_Acceptor.h" +#include "ace/Thread_Manager.h" + +#if defined (ACE_HAS_THREADS) + +class ACE_Export ACE_UPIPE_Acceptor : public ACE_SPIPE_Acceptor + // = TITLE + // Defines the format and interface for the listener side of the + // ACE_UPIPE_Stream. +{ +public: + // = Initialization and termination. + ACE_UPIPE_Acceptor (void); + // Default constructor. + + ACE_UPIPE_Acceptor (const ACE_UPIPE_Addr &local_sap, + int reuse_addr = 0); + // Initialize passive endpoint. + + int open (const ACE_UPIPE_Addr &local_sap, + int reuse_addr = 0); + // Initialize passive endpoint. + + ~ACE_UPIPE_Acceptor (void); + // Close down and release resources. + + int close (void); + // Close down and release resources. + + int remove (void); + // Close down and release resources and remove the underlying SPIPE + // rendezvous point. + + // = Passive connection acceptance method. + int accept (ACE_UPIPE_Stream &server_stream, + ACE_UPIPE_Addr *remote_addr = 0, + ACE_Time_Value *timeout = 0, + int restart = 1); + // Accept a new data transfer connection. A <timeout> of 0 means + // block forever, a <timeout> of {0, 0} means poll. <restart> == 1 + // means "restart if interrupted." + + void dump (void) const; + // Dump the state of an object. + + ACE_ALLOC_HOOK_DECLARE; + // Declare the dynamic allocation hooks. + +private: + ACE_Thread_Manager tm; + // Manage threads. + + ACE_Message_Block mb_; + // To confirm connection establishment. +}; + +#include "ace/UPIPE_Acceptor.i" +#endif /* ACE_HAS_THREADS */ +#endif /* ACE_UPIPE_ACCEPTOR_H */ |