#include <Asynch_Acceptor.h>
Inheritance diagram for ACE_Asynch_Acceptor
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 through the call. | |
virtual int | cancel (void) |
virtual int | validate_new_connection (const ACE_INET_Addr &remote_address) |
virtual int | should_reissue_accept (void) |
virtual int | pass_addresses (void) const |
Set and get flag that indicates if parsing and passing of addresses to the service_handler is necessary. | |
virtual void | pass_addresses (int new_value) |
virtual int | validate_new_connection (void) const |
Set and get flag that indicates if address validation is required. | |
virtual void | validate_new_connection (int new_value) |
virtual int | reissue_accept (void) const |
Set and get flag that indicates if a new accept should be reissued when a accept completes. | |
virtual void | reissue_accept (int new_value) |
virtual int | bytes_to_read (void) const |
Set and get bytes to be read with the call. | |
virtual void | bytes_to_read (int new_value) |
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_ |
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_ |
Flag that indicates if a new accept should be reissued when a accept completes. | |
int | bytes_to_read_ |
Bytes to be read with the call. |
Unlike the , however, this class is designed to be used asynchronously.
|
A do nothing constructor.
|
|
Virtual destruction.
|
|
This initiates a new asynchronous accept through the call.
|
|
This is required by the AcceptEx call.
|
|
Return the asynch accept object.
|
|
|
|
Set and get bytes to be read with the call.
|
|
This cancels all pending accepts operations that were issued by the calling thread. Windows NT- The function does not cancel accept operations issued by other threads POSIX - all OK, it delegates cancelation to the ACE_POSIX_Asynch_Accept |
|
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 starts the listening process at the port specified by . ACE_Asynch_Acceptor initiates the AcceptEx calls with <bytes_to_read>. The buffer for the initial data will be created by ACE_Asynch_Acceptor. This buffer will be passed to the handler in the callback. If this buffer is required past the <open> callback, the ACE_Service_Handler must copy the data. If the <pass_addresses> flag is set, ACE_Asynch_Acceptor will call before calling . The <backlog> parameter specifies the listen backlog and the outstanding AcceptEx calls. <number_of_initial_accepts> is the number of asynchronous accepts that are started at the end of <open>. If <number_of_initial_accepts> is -1, then <number_of_initial_accepts> is set to <backlog> and hence <backlog> number of asynchronous accepts are started. |
|
This parses the address from read buffer.
|
|
|
|
Set and get flag that indicates if parsing and passing of addresses to the service_handler is necessary.
|
|
|
|
Set and 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. Default implemenation always returns this->reissue_accept_. |
|
|
|
Set and get flag that indicates if address validation is required.
|
|
Template method for address validation. Default implemenation always validates the remote address. |
|
used to make life easier :-).
|
|
Bytes to be read with the 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.
|