diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
commit | c44379cc7d9c7aa113989237ab0f56db12aa5219 (patch) | |
tree | 66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/examples/Logger/simple-server/Logging_Acceptor.h | |
parent | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff) | |
download | ATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz |
Repo restructuring
Diffstat (limited to 'ACE/examples/Logger/simple-server/Logging_Acceptor.h')
-rw-r--r-- | ACE/examples/Logger/simple-server/Logging_Acceptor.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/ACE/examples/Logger/simple-server/Logging_Acceptor.h b/ACE/examples/Logger/simple-server/Logging_Acceptor.h new file mode 100644 index 00000000000..0424a7c3889 --- /dev/null +++ b/ACE/examples/Logger/simple-server/Logging_Acceptor.h @@ -0,0 +1,59 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// examples +// +// = FILENAME +// Logging_Acceptor.h +// +// = AUTHOR +// Doug Schmidt +// +// ============================================================================ + +#ifndef _CLIENT_ACCEPTOR_H +#define _CLIENT_ACCEPTOR_H + +#include "ace/SOCK_Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Event_Handler.h" + +class Logging_Acceptor : public ACE_Event_Handler + // = TITLE + // Handle connection requests from remote client clients. + // + // = DESCRIPTION + // Accepts client connection requests, creates Logging_Handler's + // to process them, and registers these Handlers with the + // ACE_Reactor Singleton. +{ +friend class Logging_Handler; +public: + Logging_Acceptor (void); + // Constructor. + + int open (const ACE_INET_Addr &a); + // Initialization. + +private: + // = Demuxing hooks. + virtual int handle_input (ACE_HANDLE); + virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); + virtual ACE_HANDLE get_handle (void) const; + + ~Logging_Acceptor (void); + // By making this private we ensure that the <Logging_Acceptor> is + // allocated dynamically. + + ACE_SOCK_Acceptor peer_acceptor_; + // Passive connection acceptor factory. +}; + +#endif /* _CLIENT_ACCEPTOR_H */ |