#include <WIN32_Asynch_IO.h>
Inheritance diagram for ACE_WIN32_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... | |
| size_t | bytes_transferred (void) const |
| Number of bytes transferred by the operation. More... | |
| const void * | act (void) const |
| ACT associated with the operation. More... | |
| int | success (void) const |
| Did the operation succeed? More... | |
| const void * | completion_key (void) const |
| u_long | error (void) const |
| Error value if the operation fail. More... | |
| ACE_HANDLE | event (void) const |
| Event associated with the OVERLAPPED structure. More... | |
| u_long | offset (void) const |
| This really make sense only when doing file I/O. More... | |
| u_long | offset_high (void) const |
| Offset_high associated with the OVERLAPPED structure. More... | |
| int | priority (void) const |
| The priority of the asynchronous operation. Currently, this is not supported on Win32. More... | |
| int | signal_number (void) const |
| No-op. Returns 0. More... | |
| int | post_completion (ACE_Proactor_Impl *proactor) |
| Post <this> to the Proactor's completion port. More... | |
Protected Methods | |
| ACE_WIN32_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=0) | |
| Constructor is protected since creation is limited to ACE_Asynch_Transmit_File factory. More... | |
| virtual void | complete (size_t bytes_transferred, int success, const void *completion_key, u_long error) |
| Proactor will call this method when the write completes. More... | |
| virtual | ~ACE_WIN32_Asynch_Transmit_File_Result (void) |
| Destructor. More... | |
Protected Attributes | |
| ACE_HANDLE | socket_ |
| Network I/O handle. More... | |
| ACE_HANDLE | file_ |
| File 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_to_write_ |
| The number of bytes which were requested at the start of the asynchronous 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_WIN32_Asynch_Transmit_File |
| Factory class will have special permission. More... | |
| class | ACE_WIN32_Proactor |
| Proactor class has special permission. More... | |
This class has all the information necessary for the <handler> to uniquiely identify the completion of the asynchronous transmit file.
Definition at line 1368 of file WIN32_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Constructor is protected since creation is limited to ACE_Asynch_Transmit_File factory.
Definition at line 2809 of file WIN32_Asynch_IO.cpp.
02822 : ACE_Asynch_Result_Impl (), 02823 ACE_Asynch_Transmit_File_Result_Impl (), 02824 ACE_WIN32_Asynch_Result (handler, act, event, offset, offset_high, priority, signal_number), 02825 socket_ (socket), 02826 file_ (file), 02827 header_and_trailer_ (header_and_trailer), 02828 bytes_to_write_ (bytes_to_write), 02829 bytes_per_send_ (bytes_per_send), 02830 flags_ (flags) 02831 { 02832 } |
|
|
Destructor.
Definition at line 2869 of file WIN32_Asynch_IO.cpp.
02870 {
02871 }
|
|
|
ACT associated with the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2883 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::act.
02884 {
02885 return ACE_WIN32_Asynch_Result::act ();
02886 }
|
|
|
Number of bytes per send requested at the start of the transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 2798 of file WIN32_Asynch_IO.cpp. References bytes_per_send_.
02799 {
02800 return this->bytes_per_send_;
02801 }
|
|
|
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 2792 of file WIN32_Asynch_IO.cpp. References bytes_to_write_.
02793 {
02794 return this->bytes_to_write_;
02795 }
|
|
|
Number of bytes transferred by the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2877 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::bytes_transferred. Referenced by complete.
02878 {
02879 return ACE_WIN32_Asynch_Result::bytes_transferred ();
02880 }
|
|
||||||||||||||||||||
|
Proactor will call this method when the write completes.
Implements ACE_Asynch_Result_Impl. Definition at line 2835 of file WIN32_Asynch_IO.cpp. References bytes_transferred, ACE_WIN32_Asynch_Result::bytes_transferred_, completion_key, ACE_WIN32_Asynch_Result::completion_key_, error, ACE_WIN32_Asynch_Result::error_, ACE_Handler::handle_transmit_file, ACE_WIN32_Asynch_Result::handler_, success, and ACE_WIN32_Asynch_Result::success_.
02839 {
02840 // Copy the data which was returned by GetQueuedCompletionStatus
02841 this->bytes_transferred_ = bytes_transferred;
02842 this->success_ = success;
02843 this->completion_key_ = completion_key;
02844 this->error_ = error;
02845
02846 // We will not do this because (a) the header and trailer blocks may
02847 // be the same message_blocks and (b) in cases of failures we have
02848 // no idea how much of what (header, data, trailer) was sent.
02849 /*
02850 if (this->success_ && this->header_and_trailer_ != 0)
02851 {
02852 ACE_Message_Block *header = this->header_and_trailer_->header ();
02853 if (header != 0)
02854 header->rd_ptr (this->header_and_trailer_->header_bytes ());
02855
02856 ACE_Message_Block *trailer = this->header_and_trailer_->trailer ();
02857 if (trailer != 0)
02858 trailer->rd_ptr (this->header_and_trailer_->trailer_bytes ());
02859 }
02860 */
02861
02862 // Create the interface result class.
02863 ACE_Asynch_Transmit_File::Result result (this);
02864
02865 // Call the application handler.
02866 this->handler_.handle_transmit_file (result);
02867 }
|
|
|
This returns the ACT associated with the handle when it was registered with the I/O completion port. This ACT is not the same as the ACT associated with the asynchronous operation. Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2895 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::completion_key. Referenced by complete.
02896 {
02897 return ACE_WIN32_Asynch_Result::completion_key ();
02898 }
|
|
|
Error value if the operation fail.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2901 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::error. Referenced by complete.
02902 {
02903 return ACE_WIN32_Asynch_Result::error ();
02904 }
|
|
|
Event associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2907 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::event.
02908 {
02909 return ACE_WIN32_Asynch_Result::event ();
02910 }
|
|
|
File from which the data is read.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 2780 of file WIN32_Asynch_IO.cpp. References file_. Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.
02781 {
02782 return this->file_;
02783 }
|
|
|
Flags which were passed into transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 2804 of file WIN32_Asynch_IO.cpp. References flags_. Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.
02805 {
02806 return this->flags_;
02807 }
|
|
|
Header and trailer data associated with this transmit file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 2786 of file WIN32_Asynch_IO.cpp. References header_and_trailer_. Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.
02787 {
02788 return this->header_and_trailer_;
02789 }
|
|
|
This really make sense only when doing file I/O.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2913 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset.
02914 {
02915 return ACE_WIN32_Asynch_Result::offset ();
02916 }
|
|
|
Offset_high associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2919 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset_high.
02920 {
02921 return ACE_WIN32_Asynch_Result::offset_high ();
02922 }
|
|
|
Post <this> to the Proactor's completion port.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2937 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::post_completion.
02938 {
02939 return ACE_WIN32_Asynch_Result::post_completion (proactor);
02940 }
|
|
|
The priority of the asynchronous operation. Currently, this is not supported on Win32.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2925 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::priority.
02926 {
02927 return ACE_WIN32_Asynch_Result::priority ();
02928 }
|
|
|
No-op. Returns 0.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2931 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::signal_number.
02932 {
02933 return ACE_WIN32_Asynch_Result::signal_number ();
02934 }
|
|
|
Socket used for transmitting the file.
Implements ACE_Asynch_Transmit_File_Result_Impl. Definition at line 2774 of file WIN32_Asynch_IO.cpp. References socket_. Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.
02775 {
02776 return this->socket_;
02777 }
|
|
|
Did the operation succeed?
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 2889 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::success. Referenced by complete.
02890 {
02891 return ACE_WIN32_Asynch_Result::success ();
02892 }
|
|
|
Factory class will have special permission.
Definition at line 1372 of file WIN32_Asynch_IO.h. |
|
|
Proactor class has special permission.
Reimplemented from ACE_WIN32_Asynch_Result. Definition at line 1375 of file WIN32_Asynch_IO.h. |
|
|
Number of bytes per send requested at the start of the transmit file.
Definition at line 1480 of file WIN32_Asynch_IO.h. Referenced by bytes_per_send. |
|
|
The number of bytes which were requested at the start of the asynchronous transmit file.
Definition at line 1476 of file WIN32_Asynch_IO.h. Referenced by bytes_to_write. |
|
|
File I/O handle.
Definition at line 1469 of file WIN32_Asynch_IO.h. Referenced by file. |
|
|
Flags which were passed into transmit file.
Definition at line 1483 of file WIN32_Asynch_IO.h. Referenced by flags. |
|
|
Header and trailer data associated with this transmit file.
Definition at line 1472 of file WIN32_Asynch_IO.h. Referenced by header_and_trailer. |
|
|
Network I/O handle.
Definition at line 1466 of file WIN32_Asynch_IO.h. Referenced by socket. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002