#include <Strategies_T.h>
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 (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 *) |
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. | |
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. |
This class provides a strategy that manages passive connection acceptance of a client.
typedef ACE_PEER_ACCEPTOR ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::acceptor_type |
typedef ACE_PEER_ACCEPTOR_ADDR ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::addr_type |
typedef SVC_HANDLER ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::handler_type |
typedef SVC_HANDLER::stream_type ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::stream_type |
ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::ACE_Accept_Strategy | ( | ACE_Reactor * | reactor = ACE_Reactor::instance () |
) | [inline] |
Default constructor.
ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::ACE_Accept_Strategy | ( | const ACE_PEER_ACCEPTOR_ADDR & | local_addr, | |
bool | restart = false , |
|||
ACE_Reactor * | reactor = ACE_Reactor::instance () | |||
) | [inline] |
Initialize the peer_acceptor_
with local_addr.
ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::~ACE_Accept_Strategy | ( | void | ) | [inline, virtual] |
int ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::accept_svc_handler | ( | SVC_HANDLER * | svc_handler | ) | [inline, virtual] |
The default behavior delegates to the <accept> method of the PEER_ACCEPTOR.
ACE_PEER_ACCEPTOR & ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::acceptor | ( | void | ) | const [inline, virtual] |
Return a reference to the <peer_acceptor_>.
void ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::dump | ( | void | ) | const [inline] |
Dump the state of an object.
ACE_HANDLE ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::get_handle | ( | void | ) | const [inline, virtual] |
Return the underlying ACE_HANDLE of the <peer_acceptor_>.
int ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::open | ( | const ACE_PEER_ACCEPTOR_ADDR & | local_addr, | |
bool | reuse_addr = false | |||
) | [inline, virtual] |
Initialize the <peer_acceptor_> with local_addr, indicating whether to reuse_addr if it's already in use.
ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
ACE_PEER_ACCEPTOR ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::peer_acceptor_ [protected] |
Factory that establishes connections passively.
ACE_PEER_ACCEPTOR_ADDR ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::peer_acceptor_addr_ [protected] |
Needed to reopen the socket if <accept> fails.
ACE_Reactor* ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::reactor_ [protected] |
Pointer to the reactor used by the Acceptor.
bool ACE_Accept_Strategy< SVC_HANDLER, ACE_PEER_ACCEPTOR_1 >::reuse_addr_ [protected] |
Needed to reopen the socket if <accept> fails.