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>`

Collaboration diagram for ACE_Accept_Strategy:

[legend]
List of all members.

## Public Methods
| ACE_Accept_Strategy (ACE_Reactor *reactor = ACE_Reactor::instance ())
| Default constructor.
| 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>.
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.
virtual ACE_HANDLE | get_handle (void) const
| Return the underlying ACE_HANDLE of the <peer_acceptor_>.
virtual ACE_PEER_ACCEPTOR& | acceptor (void) const
| Return a reference to the <peer_acceptor_>.
virtual | ~ACE_Accept_Strategy (void)
virtual int | accept_svc_handler (SVC_HANDLER *)
| The default behavior delegates to the method of the PEER_ACCEPTOR.
void | dump (void) 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_Reactor* | reactor_
| Pointer to the reactor used by the Acceptor.
int | reuse_addr_
| Needed to reopen the socket if fails.
ACE_PEER_ACCEPTOR_ADDR | peer_acceptor_addr_
| Needed to reopen the socket if fails.

## Detailed Description

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

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.

## Constructor & Destructor Documentation

template<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
ASYS_INLINE ACE_Accept_Strategy< SVC_HANDLER,ACE_PEER_ACCEPTOR_2 >::ACE_Accept_Strategy<SVC_HANDLER, > ( | ACE_Reactor * reactor = ACE_Reactor::instance () )

| Default constructor.

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

| Initialize the <peer_acceptor_> with <local_addr>.

template<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
ASYS_INLINE ACE_Accept_Strategy< SVC_HANDLER,ACE_PEER_ACCEPTOR_2 >::~ACE_Accept_Strategy<SVC_HANDLER, > ( | void )`[virtual]`

## Member Function Documentation

template<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
int ACE_Accept_Strategy<SVC_HANDLER, >::accept_svc_handler ( | SVC_HANDLER * svc_handler )`[virtual]`

| The default behavior delegates to the method of the PEER_ACCEPTOR.

template<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
ASYS_INLINE ACE_PEER_ACCEPTOR & ACE_Accept_Strategy< SVC_HANDLER,ACE_PEER_ACCEPTOR_2 >::acceptor ( | void ) const`[virtual]`

| Return a reference to the <peer_acceptor_>.

template<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
void ACE_Accept_Strategy<SVC_HANDLER, >::dump ( | void ) const

| Dump the state of an object.

template<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
ASYS_INLINE ACE_HANDLE ACE_Accept_Strategy< SVC_HANDLER,ACE_PEER_ACCEPTOR_2 >::get_handle ( | void ) const`[virtual]`

| Return the underlying ACE_HANDLE of the <peer_acceptor_>.

template<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
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<classSVC_HANDLER, ACE_PEER_ACCEPTOR_1>
ACE_Accept_Strategy<SVC_HANDLER, >::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

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

| Factory that establishes connections passively.

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

| Needed to reopen the socket if fails.

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

| Pointer to the reactor used by the Acceptor.

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

| Needed to reopen the socket if fails.

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

- Strategies_T.h
- Strategies_T.cpp
- Strategies_T.i