Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_POSIX_Asynch_Accept_Result Class Reference

This is that class which will be passed back to the <handler> when the asynchronous accept completes. More...

#include <POSIX_Asynch_IO.h>

Inheritance diagram for ACE_POSIX_Asynch_Accept_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_Asynch_Accept_Result:

Collaboration graph
[legend]
List of all members.

Public Methods

size_t bytes_to_read (void) const
 The number of bytes which were requested at the start of the asynchronous accept. More...

ACE_Message_Blockmessage_block (void) const
 Message block which contains the read data. More...

ACE_HANDLE listen_handle (void) const
 I/O handle used for accepting new connections. More...

ACE_HANDLE accept_handle (void) const
 I/O handle for the new connection. More...


Protected Methods

 ACE_POSIX_Asynch_Accept_Result (ACE_Handler &handler, ACE_HANDLE listen_handle, ACE_HANDLE accept_handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, ACE_HANDLE event, int priority, int signal_number)
 Constructor is protected since creation is limited to ACE_Asynch_Accept factory. More...

virtual void complete (size_t bytes_transferred, int success, const void *completion_key, u_long error)
 ACE_Proactor will call this method when the accept completes. More...

virtual ~ACE_POSIX_Asynch_Accept_Result (void)
 Destructor. More...


Protected Attributes

ACE_Message_Blockmessage_block_
 Message block for reading the data into. More...

ACE_HANDLE listen_handle_
 I/O handle used for accepting new connections. More...


Friends

class ACE_POSIX_Asynch_Accept
 Factory classes will have special permissions. More...

class ACE_POSIX_Proactor
 The Proactor constructs the Result class for faking results. More...


Detailed Description

This is that class which will be passed back to the <handler> when the asynchronous accept completes.

This class has all the information necessary for the <handler> to uniquiely identify the completion of the asynchronous accept.

Definition at line 589 of file POSIX_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_POSIX_Asynch_Accept_Result::ACE_POSIX_Asynch_Accept_Result ACE_Handler   handler,
ACE_HANDLE    listen_handle,
ACE_HANDLE    accept_handle,
ACE_Message_Block   message_block,
size_t    bytes_to_read,
const void *    act,
ACE_HANDLE    event,
int    priority,
int    signal_number
[protected]
 

Constructor is protected since creation is limited to ACE_Asynch_Accept factory.

Definition at line 742 of file POSIX_Asynch_IO.cpp.

00752   : ACE_Asynch_Result_Impl (),
00753     ACE_Asynch_Accept_Result_Impl (),
00754     ACE_POSIX_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
00755     message_block_ (message_block),
00756     listen_handle_ (listen_handle)
00757 {
00758   this->aio_fildes = accept_handle;
00759   this->aio_nbytes = bytes_to_read;
00760 }

ACE_POSIX_Asynch_Accept_Result::~ACE_POSIX_Asynch_Accept_Result void    [protected, virtual]
 

Destructor.

Definition at line 784 of file POSIX_Asynch_IO.cpp.

00785 {
00786 }


Member Function Documentation

ACE_HANDLE ACE_POSIX_Asynch_Accept_Result::accept_handle void    const [virtual]
 

I/O handle for the new connection.

Implements ACE_Asynch_Accept_Result_Impl.

Definition at line 736 of file POSIX_Asynch_IO.cpp.

00737 {
00738   return this->aio_fildes;
00739 }

size_t ACE_POSIX_Asynch_Accept_Result::bytes_to_read void    const [virtual]
 

The number of bytes which were requested at the start of the asynchronous accept.

Implements ACE_Asynch_Accept_Result_Impl.

Definition at line 718 of file POSIX_Asynch_IO.cpp.

00719 {
00720   return this->aio_nbytes;
00721 }

void ACE_POSIX_Asynch_Accept_Result::complete size_t    bytes_transferred,
int    success,
const void *    completion_key,
u_long    error
[protected, virtual]
 

ACE_Proactor will call this method when the accept completes.

Implements ACE_Asynch_Result_Impl.

Definition at line 763 of file POSIX_Asynch_IO.cpp.

References ACE_POSIX_Asynch_Result::bytes_transferred, ACE_POSIX_Asynch_Result::bytes_transferred_, ACE_POSIX_Asynch_Result::completion_key, ACE_POSIX_Asynch_Result::completion_key_, ACE_POSIX_Asynch_Result::error, ACE_POSIX_Asynch_Result::error_, ACE_Handler::handle_accept, ACE_POSIX_Asynch_Result::handler_, message_block_, ACE_POSIX_Asynch_Result::success, ACE_POSIX_Asynch_Result::success_, and ACE_Message_Block::wr_ptr.

00767 {
00768   // Copy the data.
00769   this->bytes_transferred_ = bytes_transferred;
00770   this->success_ = success;
00771   this->completion_key_ = completion_key;
00772   this->error_ = error;
00773 
00774   // Appropriately move the pointers in the message block.
00775   this->message_block_.wr_ptr (bytes_transferred);
00776 
00777   // Create the interface result class.
00778   ACE_Asynch_Accept::Result result (this);
00779 
00780   // Call the application handler.
00781   this->handler_.handle_accept (result);
00782 }

ACE_HANDLE ACE_POSIX_Asynch_Accept_Result::listen_handle void    const [virtual]
 

I/O handle used for accepting new connections.

Implements ACE_Asynch_Accept_Result_Impl.

Definition at line 730 of file POSIX_Asynch_IO.cpp.

References listen_handle_.

00731 {
00732   return this->listen_handle_;
00733 }

ACE_Message_Block & ACE_POSIX_Asynch_Accept_Result::message_block void    const [virtual]
 

Message block which contains the read data.

Implements ACE_Asynch_Accept_Result_Impl.

Definition at line 724 of file POSIX_Asynch_IO.cpp.

References message_block_.

00725 {
00726   return this->message_block_;
00727 }


Friends And Related Function Documentation

friend class ACE_POSIX_Asynch_Accept [friend]
 

Factory classes will have special permissions.

Definition at line 593 of file POSIX_Asynch_IO.h.

friend class ACE_POSIX_Proactor [friend]
 

The Proactor constructs the Result class for faking results.

Definition at line 596 of file POSIX_Asynch_IO.h.


Member Data Documentation

ACE_HANDLE ACE_POSIX_Asynch_Accept_Result::listen_handle_ [protected]
 

I/O handle used for accepting new connections.

Definition at line 642 of file POSIX_Asynch_IO.h.

Referenced by listen_handle.

ACE_Message_Block& ACE_POSIX_Asynch_Accept_Result::message_block_ [protected]
 

Message block for reading the data into.

Definition at line 639 of file POSIX_Asynch_IO.h.

Referenced by complete, and message_block.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:52:21 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002