Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Accept_Strategy Class Template Reference

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

#include <Strategies_T.h>

Inheritance diagram for ACE_Accept_Strategy:

Inheritance graph
[legend]
Collaboration diagram for ACE_Accept_Strategy:

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Methods

 ACE_Accept_Strategy (ACE_Reactor *reactor=ACE_Reactor::instance())
 Default constructor. More...

 ACE_Accept_Strategy (const ACE_PEER_ACCEPTOR_ADDR &local_addr, int restart=0, ACE_Reactor *reactor=ACE_Reactor::instance())
 Initialize the <peer_acceptor_> with <local_addr>. More...

virtual int open (const ACE_PEER_ACCEPTOR_ADDR &local_addr, int reuse_addr=0)
 Initialize the <peer_acceptor_> with <local_addr>, indicating whether to <reuse_addr> if it's already in use. More...

virtual ACE_HANDLE get_handle (void) const
 Return the underlying ACE_HANDLE of the <peer_acceptor_>. More...

virtual ACE_PEER_ACCEPTOR & acceptor (void) const
 Return a reference to the <peer_acceptor_>. More...

virtual ~ACE_Accept_Strategy (void)
virtual int accept_svc_handler (SVC_HANDLER *)
 The default behavior delegates to the <accept> method of the PEER_ACCEPTOR. More...

void dump (void) const
 Dump the state of an object. More...


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...


Protected Attributes

ACE_PEER_ACCEPTOR peer_acceptor_
 Factory that establishes connections passively. More...

ACE_Reactorreactor_
 Pointer to the reactor used by the Acceptor. More...

int reuse_addr_
 Needed to reopen the socket if <accept> fails. More...

ACE_PEER_ACCEPTOR_ADDR peer_acceptor_addr_
 Needed to reopen the socket if <accept> fails. More...


Detailed Description

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

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.

Definition at line 494 of file Strategies_T.h.


Member Typedef Documentation

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
typedef ACE_PEER_ACCEPTOR ACE_Accept_Strategy::acceptor_type
 

Definition at line 500 of file Strategies_T.h.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
typedef ACE_PEER_ACCEPTOR_ADDR ACE_Accept_Strategy::addr_type
 

Definition at line 499 of file Strategies_T.h.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
typedef SVC_HANDLER ACE_Accept_Strategy::handler_type
 

Definition at line 501 of file Strategies_T.h.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
typedef ACE_TYPENAME SVC_HANDLER::stream_type ACE_Accept_Strategy::stream_type
 

Definition at line 502 of file Strategies_T.h.


Constructor & Destructor Documentation

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
ACE_Accept_Strategy< SVC_HANDLER, >::ACE_Accept_Strategy ACE_Reactor   reactor = ACE_Reactor::instance()
 

Default constructor.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
ACE_Accept_Strategy< SVC_HANDLER, >::ACE_Accept_Strategy const ACE_PEER_ACCEPTOR_ADDR &    local_addr,
int    restart = 0,
ACE_Reactor   reactor = ACE_Reactor::instance()
 

Initialize the <peer_acceptor_> with <local_addr>.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
virtual ACE_Accept_Strategy< SVC_HANDLER, >::~ACE_Accept_Strategy void    [virtual]
 


Member Function Documentation

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
virtual int ACE_Accept_Strategy< SVC_HANDLER, >::accept_svc_handler SVC_HANDLER *    [virtual]
 

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

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
virtual ACE_PEER_ACCEPTOR& ACE_Accept_Strategy< SVC_HANDLER, >::acceptor void    const [virtual]
 

Return a reference to the <peer_acceptor_>.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
void ACE_Accept_Strategy< SVC_HANDLER, >::dump void    const
 

Dump the state of an object.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
virtual ACE_HANDLE ACE_Accept_Strategy< SVC_HANDLER, >::get_handle void    const [virtual]
 

Return the underlying ACE_HANDLE of the <peer_acceptor_>.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
virtual int ACE_Accept_Strategy< SVC_HANDLER, >::open const ACE_PEER_ACCEPTOR_ADDR &    local_addr,
int    reuse_addr = 0
[virtual]
 

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


Member Data Documentation

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
ACE_Accept_Strategy::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Definition at line 535 of file Strategies_T.h.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
ACE_PEER_ACCEPTOR ACE_Accept_Strategy::peer_acceptor_ [protected]
 

Factory that establishes connections passively.

Definition at line 539 of file Strategies_T.h.

Referenced by ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_2 >::acceptor, ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_2 >::get_handle, and ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_2 >::~ACE_Accept_Strategy.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
ACE_PEER_ACCEPTOR_ADDR ACE_Accept_Strategy::peer_acceptor_addr_ [protected]
 

Needed to reopen the socket if <accept> fails.

Definition at line 548 of file Strategies_T.h.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
ACE_Reactor* ACE_Accept_Strategy::reactor_ [protected]
 

Pointer to the reactor used by the Acceptor.

Definition at line 542 of file Strategies_T.h.

template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >
int ACE_Accept_Strategy::reuse_addr_ [protected]
 

Needed to reopen the socket if <accept> fails.

Definition at line 545 of file Strategies_T.h.


The documentation for this class was generated from the following file:
Generated on Mon Jun 16 12:44:32 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002