summaryrefslogtreecommitdiff
path: root/ace/LOCK_SOCK_Acceptor.h
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-29 07:05:48 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-29 07:05:48 +0000
commit3fcd67d4f009c0538574b7ba367e557623f319d8 (patch)
tree7a19edc9020f8ea95fc09b0727dbc4b89a7100a9 /ace/LOCK_SOCK_Acceptor.h
parent0cba4bb306fbdfcfb322b032f038ac1012d3b43c (diff)
downloadATCD-3fcd67d4f009c0538574b7ba367e557623f319d8.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/LOCK_SOCK_Acceptor.h')
-rw-r--r--ace/LOCK_SOCK_Acceptor.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/ace/LOCK_SOCK_Acceptor.h b/ace/LOCK_SOCK_Acceptor.h
new file mode 100644
index 00000000000..6e4d30441c6
--- /dev/null
+++ b/ace/LOCK_SOCK_Acceptor.h
@@ -0,0 +1,49 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// LOCK_SOCK_Acceptor.h
+//
+// = AUTHOR
+// James Hu and Irfan Pyarali
+//
+// ============================================================================
+
+#if !defined (LOCK_SOCK_ACCEPTOR_H)
+#define LOCK_SOCK_ACCEPTOR_H
+
+#include "ace/SOCK_Acceptor.h"
+
+template <class LOCK>
+class ACE_LOCK_SOCK_Acceptor : public ACE_SOCK_Acceptor
+ // = TITLE
+ //
+ // Specialize ACE_SOCK_Acceptor to lock around <accept>;
+{
+public:
+ virtual 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;
+protected:
+ typedef ACE_SOCK_Acceptor SUPER;
+ // Useful typedef
+
+ LOCK lock_;
+ // Type of locking mechanism.
+};
+
+#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+#include "LOCK_SOCK_Acceptor.cpp"
+#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
+
+#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
+#pragma implementation ("LOCK_SOCK_Acceptor.cpp")
+#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
+
+#endif /* LOCK_SOCK_ACCEPTOR_H */