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


Public Methods | |
| ACE_HANDLE | socket (void) const |
| Socket used for transmitting the file. More... | |
| ACE_HANDLE | file (void) const |
| File from which the data is read. More... | |
| ACE_Asynch_Transmit_File::Header_And_Trailer * | header_and_trailer (void) const |
| Header and trailer data associated with this transmit file. More... | |
| size_t | bytes_to_write (void) const |
| The number of bytes which were requested at the start of the asynchronous transmit file. More... | |
| size_t | bytes_per_send (void) const |
| Number of bytes per send requested at the start of the transmit file. More... | |
| u_long | flags (void) const |
| Flags which were passed into transmit file. More... | |
Protected Methods | |
| ACE_POSIX_Asynch_Transmit_File_Result (ACE_Handler &handler, 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. More... | |
| virtual | ~ACE_POSIX_Asynch_Transmit_File_Result (void) |
| Destructor. More... | |
Protected Attributes | |
| ACE_HANDLE | socket_ |
| Network I/O handle. More... | |
| ACE_Asynch_Transmit_File::Header_And_Trailer * | header_and_trailer_ |
| Header and trailer data associated with this transmit file. More... | |
| size_t | bytes_per_send_ |
| Number of bytes per send requested at the start of the transmit file. More... | |
| u_long | flags_ |
| Flags which were passed into transmit file. More... | |
Friends | |
| class | ACE_POSIX_Asynch_Transmit_File |
| Factory classes will have special permissions. More... | |
| class | ACE_POSIX_Asynch_Transmit_Handler |
| Handlers do all the job. More... | |
| class | ACE_POSIX_Proactor |
| The Proactor constructs the Result class for faking results. More... | |
This class has all the information necessary for the <handler> to uniquiely identify the completion of the asynchronous transmit file.
Definition at line 932 of file POSIX_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 1827 of file POSIX_Asynch_IO.cpp.
01841 : ACE_Asynch_Result_Impl (), 01842 ACE_Asynch_Transmit_File_Result_Impl (), 01843 ACE_POSIX_Asynch_Result (handler, act, event, offset, offset_high, priority, signal_number), 01844 socket_ (socket), 01845 header_and_trailer_ (header_and_trailer), 01846 bytes_per_send_ (bytes_per_send), 01847 flags_ (flags) 01848 { 01849 this->aio_fildes = file; 01850 this->aio_nbytes = bytes_to_write; 01851 } |
|
|
Destructor.
Definition at line 1888 of file POSIX_Asynch_IO.cpp.
01889 {
01890 }
|
|
|
Number of bytes per send requested at the start of the transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1815 of file POSIX_Asynch_IO.cpp. References bytes_per_send_.
01816 {
01817 return this->bytes_per_send_;
01818 }
|
|
|
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 1809 of file POSIX_Asynch_IO.cpp.
01810 {
01811 return this->aio_nbytes;
01812 }
|
|
||||||||||||||||||||
|
ACE_Proactor will call this method when the write completes.
Implements ACE_Asynch_Result_Impl. Definition at line 1854 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_transmit_file, ACE_POSIX_Asynch_Result::handler_, ACE_POSIX_Asynch_Result::success, and ACE_POSIX_Asynch_Result::success_. Referenced by ACE_POSIX_Asynch_Transmit_Handler::handle_read_file, and ACE_POSIX_Asynch_Transmit_Handler::handle_write_stream.
01858 {
01859 // Copy the data.
01860 this->bytes_transferred_ = bytes_transferred;
01861 this->success_ = success;
01862 this->completion_key_ = completion_key;
01863 this->error_ = error;
01864
01865 // We will not do this because (a) the header and trailer blocks may
01866 // be the same message_blocks and (b) in cases of failures we have
01867 // no idea how much of what (header, data, trailer) was sent.
01868 /*
01869 if (this->success_ && this->header_and_trailer_ != 0)
01870 {
01871 ACE_Message_Block *header = this->header_and_trailer_->header ();
01872 if (header != 0)
01873 header->rd_ptr (this->header_and_trailer_->header_bytes ());
01874
01875 ACE_Message_Block *trailer = this->header_and_trailer_->trailer ();
01876 if (trailer != 0)
01877 trailer->rd_ptr (this->header_and_trailer_->trailer_bytes ());
01878 }
01879 */
01880
01881 // Create the interface result class.
01882 ACE_Asynch_Transmit_File::Result result (this);
01883
01884 // Call the application handler.
01885 this->handler_.handle_transmit_file (result);
01886 }
|
|
|
File from which the data is read.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1797 of file POSIX_Asynch_IO.cpp.
01798 {
01799 return this->aio_fildes;
01800 }
|
|
|
Flags which were passed into transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1821 of file POSIX_Asynch_IO.cpp. References flags_.
01822 {
01823 return this->flags_;
01824 }
|
|
|
Header and trailer data associated with this transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1803 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.
01804 {
01805 return this->header_and_trailer_;
01806 }
|
|
|
Socket used for transmitting the file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 1791 of file POSIX_Asynch_IO.cpp. References socket_.
01792 {
01793 return this->socket_;
01794 }
|
|
|
Factory classes will have special permissions.
Definition at line 936 of file POSIX_Asynch_IO.h. |
|
|
Handlers do all the job.
Definition at line 939 of file POSIX_Asynch_IO.h. |
|
|
The Proactor constructs the Result class for faking results.
Definition at line 942 of file POSIX_Asynch_IO.h. |
|
|
Number of bytes per send requested at the start of the transmit file.
Definition at line 1006 of file POSIX_Asynch_IO.h. Referenced by bytes_per_send. |
|
|
Flags which were passed into transmit file.
Definition at line 1009 of file POSIX_Asynch_IO.h. Referenced by flags. |
|
|
Header and trailer data associated with this transmit file.
Definition at line 998 of file POSIX_Asynch_IO.h. Referenced by header_and_trailer. |
|
|
Network I/O handle.
Definition at line 992 of file POSIX_Asynch_IO.h. Referenced by socket. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002