#include <WIN32_Asynch_IO.h>
Inheritance diagram for ACE_WIN32_Asynch_Write_Stream_Result:


Public Methods | |
| size_t | bytes_to_write (void) const |
| The number of bytes which were requested at the start of the asynchronous write. More... | |
| ACE_Message_Block & | message_block (void) const |
| Message block that contains the data to be written. More... | |
| ACE_HANDLE | handle (void) const |
| I/O handle used for writing. 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... | |
| int | gather_enabled (void) const |
| Accessor for the gather write flag. More... | |
Protected Methods | |
| ACE_WIN32_Asynch_Write_Stream_Result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, ACE_HANDLE event, int priority, int signal_number=0, int gather_enabled=0) | |
| Constructor is protected since creation is limited to ACE_Asynch_Write_Stream 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 write completes. More... | |
| virtual | ~ACE_WIN32_Asynch_Write_Stream_Result (void) |
| Destructor. More... | |
Protected Attributes | |
| size_t | bytes_to_write_ |
| The number of bytes which were requested at the start of the asynchronous write. More... | |
| ACE_Message_Block & | message_block_ |
| Message block that contains the data to be written. More... | |
| ACE_HANDLE | handle_ |
| I/O handle used for writing. More... | |
| int | gather_enabled_ |
| Flag for gather write. More... | |
Friends | |
| class | ACE_WIN32_Asynch_Write_Stream |
| Factory class willl have special permissions. More... | |
| class | ACE_WIN32_Proactor |
| Proactor class has special permission. More... | |
Definition at line 382 of file WIN32_Asynch_IO.h.
|
||||||||||||||||||||||||||||||||||||||||
|
Constructor is protected since creation is limited to ACE_Asynch_Write_Stream factory.
Definition at line 637 of file WIN32_Asynch_IO.cpp.
00646 : ACE_Asynch_Result_Impl (), 00647 ACE_Asynch_Write_Stream_Result_Impl (), 00648 ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number), 00649 bytes_to_write_ (bytes_to_write), 00650 message_block_ (message_block), 00651 handle_ (handle), 00652 gather_enabled_ (gather_enabled) 00653 { 00654 } |
|
|
Destructor.
Definition at line 695 of file WIN32_Asynch_IO.cpp.
00696 {
00697 }
|
|
|
ACT associated with the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 709 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::act.
00710 {
00711 return ACE_WIN32_Asynch_Result::act ();
00712 }
|
|
|
The number of bytes which were requested at the start of the asynchronous write.
Implements ACE_Asynch_Write_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 620 of file WIN32_Asynch_IO.cpp. References bytes_to_write_. Referenced by ACE_WIN32_Asynch_Write_File_Result::bytes_to_write, and ACE_WIN32_Asynch_Write_Stream::shared_write.
00621 {
00622 return this->bytes_to_write_;
00623 }
|
|
|
Number of bytes transferred by the operation.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 703 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::bytes_transferred. Referenced by complete.
00704 {
00705 return ACE_WIN32_Asynch_Result::bytes_transferred ();
00706 }
|
|
||||||||||||||||||||
|
ACE_Proactor will call this method when the write completes.
Implements ACE_Asynch_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 657 of file WIN32_Asynch_IO.cpp. References bytes_transferred, ACE_WIN32_Asynch_Result::bytes_transferred_, completion_key, ACE_WIN32_Asynch_Result::completion_key_, ACE_Message_Block::cont, error, ACE_WIN32_Asynch_Result::error_, gather_enabled, ACE_Handler::handle_write_stream, ACE_WIN32_Asynch_Result::handler_, ACE_Message_Block::length, message_block_, ACE_Message_Block::rd_ptr, success, and ACE_WIN32_Asynch_Result::success_.
00661 {
00662 // Copy the data which was returned by <GetQueuedCompletionStatus>.
00663 this->bytes_transferred_ = bytes_transferred;
00664 this->success_ = success;
00665 this->completion_key_ = completion_key;
00666 this->error_ = error;
00667
00668 // Appropriately move the pointers in the message block.
00669 if (!this->gather_enabled ())
00670 this->message_block_.rd_ptr (bytes_transferred);
00671 else
00672 {
00673 for (ACE_Message_Block* mb = &this->message_block_;
00674 (mb != 0) && (bytes_transferred > 0);
00675 mb = mb->cont ())
00676 {
00677 size_t len_part = mb->length ();
00678
00679 if ( len_part > bytes_transferred)
00680 len_part = bytes_transferred;
00681
00682 mb->rd_ptr (len_part);
00683
00684 bytes_transferred -= len_part;
00685 }
00686 }
00687
00688 // Create the interface result class.
00689 ACE_Asynch_Write_Stream::Result result (this);
00690
00691 // Call the application handler.
00692 this->handler_.handle_write_stream (result);
00693 }
|
|
|
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. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 721 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::completion_key. Referenced by complete.
00722 {
00723 return ACE_WIN32_Asynch_Result::completion_key ();
00724 }
|
|
|
Error value if the operation fail.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 727 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::error. Referenced by complete.
00728 {
00729 return ACE_WIN32_Asynch_Result::error ();
00730 }
|
|
|
Event associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 733 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::event.
00734 {
00735 return ACE_WIN32_Asynch_Result::event ();
00736 }
|
|
|
Accessor for the gather write flag.
Definition at line 769 of file WIN32_Asynch_IO.cpp. References gather_enabled_. Referenced by ACE_WIN32_Asynch_Write_File_Result::complete, and complete.
00770 {
00771 return this->gather_enabled_;
00772 }
|
|
|
I/O handle used for writing.
Implements ACE_Asynch_Write_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 632 of file WIN32_Asynch_IO.cpp. References handle_. Referenced by ACE_WIN32_Asynch_Write_File_Result::handle, ACE_WIN32_Asynch_Write_Stream::shared_write, and ACE_WIN32_Asynch_Write_Stream::writev.
00633 {
00634 return this->handle_;
00635 }
|
|
|
Message block that contains the data to be written.
Implements ACE_Asynch_Write_Stream_Result_Impl. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 626 of file WIN32_Asynch_IO.cpp. References message_block_. Referenced by ACE_WIN32_Asynch_Write_File_Result::message_block, and ACE_WIN32_Asynch_Write_Stream::shared_write.
00627 {
00628 return this->message_block_;
00629 }
|
|
|
This really make sense only when doing file I/O.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 739 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset.
00740 {
00741 return ACE_WIN32_Asynch_Result::offset ();
00742 }
|
|
|
Offset_high associated with the OVERLAPPED structure.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 745 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::offset_high.
00746 {
00747 return ACE_WIN32_Asynch_Result::offset_high ();
00748 }
|
|
|
Post <this> to the Proactor's completion port.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 763 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::post_completion.
00764 {
00765 return ACE_WIN32_Asynch_Result::post_completion (proactor);
00766 }
|
|
|
The priority of the asynchronous operation. Currently, this is not supported on Win32.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 751 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::priority.
00752 {
00753 return ACE_WIN32_Asynch_Result::priority ();
00754 }
|
|
|
No-op. Returns 0.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 757 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::signal_number.
00758 {
00759 return ACE_WIN32_Asynch_Result::signal_number ();
00760 }
|
|
|
Did the operation succeed?
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 715 of file WIN32_Asynch_IO.cpp. References ACE_WIN32_Asynch_Result::success. Referenced by complete.
00716 {
00717 return ACE_WIN32_Asynch_Result::success ();
00718 }
|
|
|
Factory class willl have special permissions.
Definition at line 386 of file WIN32_Asynch_IO.h. |
|
|
Proactor class has special permission.
Reimplemented from ACE_WIN32_Asynch_Result. Reimplemented in ACE_WIN32_Asynch_Write_File_Result. Definition at line 389 of file WIN32_Asynch_IO.h. |
|
|
The number of bytes which were requested at the start of the asynchronous write.
Definition at line 470 of file WIN32_Asynch_IO.h. Referenced by bytes_to_write. |
|
|
Flag for gather write.
Definition at line 479 of file WIN32_Asynch_IO.h. Referenced by gather_enabled. |
|
|
I/O handle used for writing.
Definition at line 476 of file WIN32_Asynch_IO.h. Referenced by handle. |
|
|
Message block that contains the data to be written.
Definition at line 473 of file WIN32_Asynch_IO.h. Referenced by ACE_WIN32_Asynch_Write_File_Result::complete, complete, and message_block. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002