#include <POSIX_Asynch_IO.h>
Inheritance diagram for ACE_POSIX_Asynch_Transmit_File_Result:


Public Member Functions | |
| ACE_HANDLE | socket (void) const |
| Socket used for transmitting the file. | |
| ACE_HANDLE | file (void) const |
| File from which the data is read. | |
| ACE_Asynch_Transmit_File::Header_And_Trailer * | header_and_trailer (void) const |
| Header and trailer data associated with this transmit file. | |
| size_t | bytes_to_write (void) const |
| size_t | bytes_per_send (void) const |
| u_long | flags (void) const |
| Flags which were passed into transmit file. | |
Protected Member Functions | |
| ACE_POSIX_Asynch_Transmit_File_Result (const ACE_Handler::Proxy_Ptr &handler_proxy, ACE_HANDLE socket, ACE_HANDLE file, ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer, size_t bytes_to_write, u_long offset, u_long offset_high, size_t bytes_per_send, u_long flags, const void *act, ACE_HANDLE event, int priority, int signal_number) | |
| virtual void | complete (size_t bytes_transferred, int success, const void *completion_key, u_long error) |
| ACE_Proactor will call this method when the write completes. | |
| virtual | ~ACE_POSIX_Asynch_Transmit_File_Result (void) |
| Destructor. | |
Protected Attributes | |
| ACE_HANDLE | socket_ |
| Network I/O handle. | |
| ACE_Asynch_Transmit_File::Header_And_Trailer * | header_and_trailer_ |
| Header and trailer data associated with this transmit file. | |
| size_t | bytes_per_send_ |
| u_long | flags_ |
| Flags which were passed into transmit file. | |
Friends | |
| class | ACE_POSIX_Asynch_Transmit_File |
| Factory classes will have special permissions. | |
| class | ACE_POSIX_Asynch_Transmit_Handler |
| Handlers do all the job. | |
| class | ACE_POSIX_Proactor |
| The Proactor constructs the Result class for faking results. | |
This class has all the information necessary for the to uniquiely identify the completion of the asynchronous transmit file.
Definition at line 921 of file POSIX_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 1657 of file POSIX_Asynch_IO.cpp. References ACE_Handler::Proxy_Ptr.
01670 : ACE_POSIX_Asynch_Result 01671 (handler_proxy, act, event, offset, offset_high, priority, signal_number), 01672 socket_ (socket), 01673 header_and_trailer_ (header_and_trailer), 01674 bytes_per_send_ (bytes_per_send), 01675 flags_ (flags) 01676 { 01677 this->aio_fildes = file; 01678 this->aio_nbytes = bytes_to_write; 01679 } |
|
|
Destructor.
Definition at line 1718 of file POSIX_Asynch_IO.cpp.
01719 {
01720 }
|
|
|
Number of bytes per send requested at the start of the transmit file. Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1645 of file POSIX_Asynch_IO.cpp. References bytes_per_send_.
01646 {
01647 return this->bytes_per_send_;
01648 }
|
|
|
The number of bytes which were requested at the start of the asynchronous transmit file. Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1639 of file POSIX_Asynch_IO.cpp.
01640 {
01641 return this->aio_nbytes;
01642 }
|
|
||||||||||||||||||||
|
ACE_Proactor will call this method when the write completes.
Implements ACE_Asynch_Result_Impl. Definition at line 1682 of file POSIX_Asynch_IO.cpp. References ACE_Refcounted_Auto_Ptr< X, ACE_LOCK >::get(), and ACE_Handler::handle_transmit_file(). Referenced by ACE_POSIX_Asynch_Transmit_Handler::handle_read_file(), and ACE_POSIX_Asynch_Transmit_Handler::handle_write_stream().
01686 {
01687 // Copy the data.
01688 this->bytes_transferred_ = bytes_transferred;
01689 this->success_ = success;
01690 this->completion_key_ = completion_key;
01691 this->error_ = error;
01692
01693 // We will not do this because (a) the header and trailer blocks may
01694 // be the same message_blocks and (b) in cases of failures we have
01695 // no idea how much of what (header, data, trailer) was sent.
01696 /*
01697 if (this->success_ && this->header_and_trailer_ != 0)
01698 {
01699 ACE_Message_Block *header = this->header_and_trailer_->header ();
01700 if (header != 0)
01701 header->rd_ptr (this->header_and_trailer_->header_bytes ());
01702
01703 ACE_Message_Block *trailer = this->header_and_trailer_->trailer ();
01704 if (trailer != 0)
01705 trailer->rd_ptr (this->header_and_trailer_->trailer_bytes ());
01706 }
01707 */
01708
01709 // Create the interface result class.
01710 ACE_Asynch_Transmit_File::Result result (this);
01711
01712 // Call the application handler.
01713 ACE_Handler *handler = this->handler_proxy_.get ()->handler ();
01714 if (handler != 0)
01715 handler->handle_transmit_file (result);
01716 }
|
|
|
File from which the data is read.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1627 of file POSIX_Asynch_IO.cpp. Referenced by ACE_POSIX_Asynch_Transmit_Handler::transmit().
01628 {
01629 return this->aio_fildes;
01630 }
|
|
|
Flags which were passed into transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1651 of file POSIX_Asynch_IO.cpp.
01652 {
01653 return this->flags_;
01654 }
|
|
|
Header and trailer data associated with this transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1633 of file POSIX_Asynch_IO.cpp. References header_and_trailer_. Referenced by ACE_POSIX_Asynch_Transmit_Handler::initiate_read_file(), and ACE_POSIX_Asynch_Transmit_Handler::transmit().
01634 {
01635 return this->header_and_trailer_;
01636 }
|
|
|
Socket used for transmitting the file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1621 of file POSIX_Asynch_IO.cpp. References socket_. Referenced by ACE_POSIX_Asynch_Transmit_Handler::transmit().
01622 {
01623 return this->socket_;
01624 }
|
|
|
Factory classes will have special permissions.
Definition at line 925 of file POSIX_Asynch_IO.h. |
|
|
Handlers do all the job.
Definition at line 928 of file POSIX_Asynch_IO.h. |
|
|
The Proactor constructs the Result class for faking results.
Definition at line 931 of file POSIX_Asynch_IO.h. |
|
|
Number of bytes per send requested at the start of the transmit file. Definition at line 995 of file POSIX_Asynch_IO.h. Referenced by bytes_per_send(). |
|
|
Flags which were passed into transmit file.
Definition at line 998 of file POSIX_Asynch_IO.h. |
|
|
Header and trailer data associated with this transmit file.
Definition at line 987 of file POSIX_Asynch_IO.h. Referenced by header_and_trailer(). |
|
|
Network I/O handle.
Definition at line 981 of file POSIX_Asynch_IO.h. Referenced by socket(). |
1.3.6