ACE 8.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 > Class Template Reference

Defines the interface for specifying a passive connection acceptance strategy for a SVC_HANDLER. More...

#include <Strategies_T.h>

Collaboration diagram for ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >:
Collaboration graph
[legend]

Public Types

typedef ACE_PEER_ACCEPTOR_ADDR addr_type
 
typedef ACE_PEER_ACCEPTOR acceptor_type
 
typedef SVC_HANDLER handler_type
 
typedef SVC_HANDLER::stream_type stream_type
 

Public Member Functions

 ACE_Accept_Strategy (ACE_Reactor *reactor=ACE_Reactor::instance())
 Default constructor.
 
 ACE_Accept_Strategy (const ACE_PEER_ACCEPTOR_ADDR &local_addr, bool restart=false, ACE_Reactor *reactor=ACE_Reactor::instance())
 Initialize the peer_acceptor_ with local_addr.
 
virtual int open (const ACE_PEER_ACCEPTOR_ADDR &local_addr, bool reuse_addr=false)
 
virtual ACE_HANDLE get_handle () const
 Return the underlying ACE_HANDLE of the <peer_acceptor_>.
 
virtual ACE_PEER_ACCEPTORacceptor () const
 Return a reference to the <peer_acceptor_>.
 
virtual ~ACE_Accept_Strategy ()
 
virtual int accept_svc_handler (SVC_HANDLER *)
 
void dump () const
 Dump the state of an object.
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
 

Protected Attributes

ACE_PEER_ACCEPTOR peer_acceptor_
 Factory that establishes connections passively.
 
ACE_Reactorreactor_
 Pointer to the reactor used by the Acceptor.
 
bool reuse_addr_
 Needed to reopen the socket if <accept> fails.
 
ACE_PEER_ACCEPTOR_ADDR peer_acceptor_addr_
 Needed to reopen the socket if <accept> fails.
 

Detailed Description

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
class ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >

Defines the interface for specifying a passive connection acceptance strategy for a SVC_HANDLER.

This class provides a strategy that manages passive connection acceptance of a client.

Member Typedef Documentation

◆ acceptor_type

◆ addr_type

◆ handler_type

◆ stream_type

typedef SVC_HANDLER::stream_type ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::stream_type

Constructor & Destructor Documentation

◆ ACE_Accept_Strategy() [1/2]

Default constructor.

◆ ACE_Accept_Strategy() [2/2]

Initialize the peer_acceptor_ with local_addr.

◆ ~ACE_Accept_Strategy()

Member Function Documentation

◆ accept_svc_handler()

int ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::accept_svc_handler ( SVC_HANDLER * svc_handler)
virtual

The default behavior delegates to the <accept> method of the PEER_ACCEPTOR.

◆ acceptor()

Return a reference to the <peer_acceptor_>.

◆ dump()

Dump the state of an object.

◆ get_handle()

Return the underlying ACE_HANDLE of the <peer_acceptor_>.

◆ open()

int ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::open ( const ACE_PEER_ACCEPTOR_ADDR & local_addr,
bool reuse_addr = false )
virtual

Initialize the <peer_acceptor_> with local_addr, indicating whether to reuse_addr if it's already in use.

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ peer_acceptor_

Factory that establishes connections passively.

◆ peer_acceptor_addr_

Needed to reopen the socket if <accept> fails.

◆ reactor_

Pointer to the reactor used by the Acceptor.

◆ reuse_addr_

Needed to reopen the socket if <accept> fails.


The documentation for this class was generated from the following files: