00001
00002
00003 #ifndef ACE_LOCK_SOCK_ACCEPTOR_CPP
00004 #define ACE_LOCK_SOCK_ACCEPTOR_CPP
00005
00006 #include "ace/Guard_T.h"
00007 #include "ace/LOCK_SOCK_Acceptor.h"
00008
00009 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00010
00011 template <class ACE_LOCK> int
00012 ACE_LOCK_SOCK_Acceptor<ACE_LOCK>::accept (ACE_SOCK_Stream &stream,
00013 ACE_Addr *remote_address,
00014 ACE_Time_Value *timeout,
00015 int restart,
00016 int reset_new_handle) const
00017 {
00018 ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->lock_, -1);
00019
00020 return ACE_SOCK_Acceptor::accept (stream,
00021 remote_address,
00022 timeout,
00023 restart,
00024 reset_new_handle);
00025 }
00026
00027 template <class ACE_LOCK> ACE_LOCK &
00028 ACE_LOCK_SOCK_Acceptor<ACE_LOCK>::lock (void)
00029 {
00030 return this->lock_;
00031 }
00032
00033 ACE_END_VERSIONED_NAMESPACE_DECL
00034
00035 #endif