diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
commit | 53284e215e3d3351a7d7e9c4b68f14b427fb4377 (patch) | |
tree | 97236ece363cff48fd287c780db4290da39b02cb /ace/LOCK_SOCK_Acceptor.h | |
parent | 7b7c52ad2abd228138ba1a948d5e28bf6dc3b880 (diff) | |
download | ATCD-53284e215e3d3351a7d7e9c4b68f14b427fb4377.tar.gz |
ChangeLogTag:Wed Nov 1 14:11:48 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/LOCK_SOCK_Acceptor.h')
-rw-r--r-- | ace/LOCK_SOCK_Acceptor.h | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/ace/LOCK_SOCK_Acceptor.h b/ace/LOCK_SOCK_Acceptor.h index eaa16fc4e49..720664e65ff 100644 --- a/ace/LOCK_SOCK_Acceptor.h +++ b/ace/LOCK_SOCK_Acceptor.h @@ -1,17 +1,14 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// LOCK_SOCK_Acceptor.h -// -// = AUTHOR -// James Hu and Irfan Pyarali -// -// ============================================================================ + +//============================================================================= +/** + * @file LOCK_SOCK_Acceptor.h + * + * $Id$ + * + * @author James Hu and Irfan Pyarali + */ +//============================================================================= + #ifndef ACE_LOCK_SOCK_ACCEPTOR_H #define ACE_LOCK_SOCK_ACCEPTOR_H @@ -23,32 +20,34 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +/** + * @class ACE_LOCK_SOCK_Acceptor + * + * @brief Specialize <ACE_SOCK_Acceptor> to lock around <accept>; + * + * This class is necessary since some OS platforms (e.g., + * Solaris 2.5) do not allow multiple threads/processes to + * simultaneously call <accept> on the same listen-mode + * port/socket. Thus, we need to protect against multiple + * concurrent accesses by using the appropriate type of lock. + */ template <class ACE_LOCK> class ACE_LOCK_SOCK_Acceptor : public ACE_SOCK_Acceptor { - // = TITLE - // Specialize <ACE_SOCK_Acceptor> to lock around <accept>; - // - // = DESCRIPTION - // This class is necessary since some OS platforms (e.g., - // Solaris 2.5) do not allow multiple threads/processes to - // simultaneously call <accept> on the same listen-mode - // port/socket. Thus, we need to protect against multiple - // concurrent accesses by using the appropriate type of lock. public: + /// Accept the connection under the control of the <ACE_LOCK>. int accept (ACE_SOCK_Stream &new_stream, ACE_Addr *remote_addr = 0, ACE_Time_Value *timeout = 0, int restart = 1, int reset_new_handle = 0) const; - // Accept the connection under the control of the <ACE_LOCK>. + /// Return a reference to the lock. ACE_LOCK &lock (void); - // Return a reference to the lock. protected: + /// Type of locking mechanism. ACE_LOCK lock_; - // Type of locking mechanism. }; #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) |