#include <Asynch_Acceptor.h>
Inheritance diagram for ACE_Asynch_Acceptor< HANDLER >:
Public Methods | |
ACE_Asynch_Acceptor (void) | |
A do nothing constructor. | |
virtual | ~ACE_Asynch_Acceptor (void) |
Virtual destruction. | |
virtual int | open (const ACE_INET_Addr &address, size_t bytes_to_read=0, int pass_addresses=0, int backlog=ACE_DEFAULT_BACKLOG, int reuse_addr=1, ACE_Proactor *proactor=0, int validate_new_connection=0, int reissue_accept=1, int number_of_initial_accepts=-1) |
virtual ACE_HANDLE | get_handle (void) const |
Get the underlying handle. | |
virtual void | set_handle (ACE_HANDLE handle) |
virtual int | accept (size_t bytes_to_read=0, const void *act=0) |
This initiates a new asynchronous accept operation. | |
virtual int | cancel (void) |
virtual int | validate_connection (const ACE_Asynch_Accept::Result &result, const ACE_INET_Addr &remote, const ACE_INET_Addr &local) |
virtual int | validate_new_connection (const ACE_INET_Addr &remote_address) |
virtual int | should_reissue_accept (void) |
virtual int | pass_addresses (void) const |
virtual void | pass_addresses (int new_value) |
virtual int | validate_new_connection (void) const |
Get flag that indicates if address validation is required. | |
virtual void | validate_new_connection (int new_value) |
Set flag that indicates if address validation is required. | |
virtual int | reissue_accept (void) const |
virtual void | reissue_accept (int new_value) |
virtual size_t | bytes_to_read (void) const |
Get bytes to be read with the <accept> call. | |
virtual void | bytes_to_read (size_t new_value) |
Set bytes to be read with the <accept> call. | |
Static Public Methods | |
size_t | address_size (void) |
This is required by the AcceptEx call. | |
Protected Methods | |
virtual void | handle_accept (const ACE_Asynch_Accept::Result &result) |
This is called when an outstanding accept completes. | |
ACE_HANDLE | handle (void) const |
Return the listen handle. | |
void | handle (ACE_HANDLE h) |
Set the listen handle. | |
void | parse_address (const ACE_Asynch_Accept::Result &result, ACE_INET_Addr &remote_address, ACE_INET_Addr &local_address) |
This parses the address from read buffer. | |
ACE_Asynch_Accept & | asynch_accept (void) |
Return the asynch accept object. | |
virtual HANDLER * | make_handler (void) |
Private Attributes | |
ACE_HANDLE | listen_handle_ |
Handle used to listen for new connections. | |
ACE_Asynch_Accept | asynch_accept_ |
<Asynch_Accept> used to make life easier :-) | |
int | pass_addresses_ |
Flag that indicates if parsing of addresses is necessary. | |
int | validate_new_connection_ |
Flag that indicates if address validation is required. | |
int | reissue_accept_ |
size_t | bytes_to_read_ |
Bytes to be read with the <accept> call. |
Unlike the <ACE_Acceptor>, however, this class is designed to be used asynchronously.
|
A do nothing constructor.
|
|
Virtual destruction.
|
|
This initiates a new asynchronous accept operation.
You need only call this method if the reissue_accept argument passed to |
|
This is required by the AcceptEx call.
|
|
Return the asynch accept object.
|
|
Set bytes to be read with the <accept> call.
|
|
Get bytes to be read with the <accept> call.
|
|
Cancels all pending accepts operations issued by this object.
|
|
Get the underlying handle.
|
|
Set the listen handle.
Reimplemented from ACE_Handler. |
|
Return the listen handle.
Reimplemented from ACE_Handler. |
|
This is called when an outstanding accept completes.
Reimplemented from ACE_Handler. |
|
This is the template method used to create new handler. Subclasses must overwrite this method if a new handler creation strategy is required. |
|
|
|
This parses the address from read buffer.
|
|
Set flag that indicates if parsing and passing of addresses to the service_handler is necessary. |
|
Get flag that indicates if parsing and passing of addresses to the service_handler is necessary. |
|
Set flag that indicates if a new accept should be reissued when a accept completes. |
|
Get flag that indicates if a new accept should be reissued when a accept completes. |
|
Set the underlying listen handle. It is the user's responsibility to make sure that the old listen handle has been appropriately closed and the all outstanding asynchronous operations have either completed or have been canceled on the old listen handle. |
|
Template method for deciding whether to reissue accept. This hook method is called after each accept completes to decide if another accept should be initiated. If the method returns a non-zero value, another accept is initiated.
The default implemenation always returns the value passed as the |
|
Template method to validate peer before service is opened. This method is called after a new connection is accepted if the validate_connection argument to
|
|
Set flag that indicates if address validation is required.
|
|
Get flag that indicates if address validation is required.
|
|
Template method for address validation.
This hook method is called after a connection is accepted if so specified on the call to the The default implemenation always return 0. |
|
<Asynch_Accept> used to make life easier :-)
|
|
Bytes to be read with the <accept> call.
|
|
Handle used to listen for new connections.
|
|
Flag that indicates if parsing of addresses is necessary.
|
|
Flag that indicates if a new accept should be reissued when a accept completes. |
|
Flag that indicates if address validation is required.
|