NAME
ACE_Accept_Strategy -
Defines the interface for specifying a passive connection
acceptance strategy for a SVC_HANDLER.
SYNOPSIS
#include <ace/ACE_Strategies.h >
template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
class ACE_Accept_Strategy
{
public:
ACE_Accept_Strategy (void);
ACE_Accept_Strategy (
const ACE_PEER_ACCEPTOR_ADDR &local_addr,
int restart = 0
);
virtual int open (
const ACE_PEER_ACCEPTOR_ADDR &local_addr,
int restart = 0
);
virtual ACE_HANDLE get_handle (void) const;
virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
~ACE_Accept_Strategy (void);
virtual int accept_svc_handler (SVC_HANDLER *);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
protected:
ACE_PEER_ACCEPTOR peer_acceptor_;
};
DESCRIPTION
This class provides a strategy that manages passive
connection acceptance of a client.
Initialization and termination methods.
ACE_Accept_Strategy (void);
ACE_Accept_Strategy (
const ACE_PEER_ACCEPTOR_ADDR &local_addr,
int restart = 0
);
Initialize the peer_acceptor_ with local_addr.
virtual int open (
const ACE_PEER_ACCEPTOR_ADDR &local_addr,
int restart = 0
);
Initialize the peer_acceptor_ with local_addr.
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_.
~ACE_Accept_Strategy (void);
Factory method.
virtual int accept_svc_handler (SVC_HANDLER *);
The default behavior delegates to the accept method of the
PEER_ACCEPTOR.
void dump (void) const;
Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
AUTHOR
Doug Schmidt
LIBRARY
ace