ACE  6.0.6
Public Member Functions | Protected Attributes
ACE_LOCK_SOCK_Acceptor Class Reference

Specialize ACE_SOCK_Acceptor to lock around <accept>;. More...

#include <LOCK_SOCK_Acceptor.h>

Inheritance diagram for ACE_LOCK_SOCK_Acceptor:
Inheritance graph
Collaboration diagram for ACE_LOCK_SOCK_Acceptor:
Collaboration graph

List of all members.

Public Member Functions

int accept (ACE_SOCK_Stream &new_stream, ACE_Addr *remote_addr=0, ACE_Time_Value *timeout=0, bool restart=true, bool reset_new_handle=false) const
 Accept the connection under the control of the <ACE_LOCK>.
ACE_LOCK & lock (void)
 Return a reference to the lock.

Protected Attributes

ACE_LOCK lock_
 Type of locking mechanism.

Detailed Description

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.

Member Function Documentation

int ACE_LOCK_SOCK_Acceptor::accept ( ACE_SOCK_Stream new_stream,
ACE_Addr remote_addr = 0,
ACE_Time_Value timeout = 0,
bool  restart = true,
bool  reset_new_handle = false 
) const

Accept the connection under the control of the <ACE_LOCK>.

Reimplemented from ACE_SOCK_Acceptor.

ACE_LOCK & ACE_LOCK_SOCK_Acceptor::lock ( void  )

Return a reference to the lock.

Member Data Documentation

ACE_LOCK ACE_LOCK_SOCK_Acceptor::lock_ [protected]

Type of locking mechanism.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines