#include <POSIX_Asynch_IO.h>
Inheritance diagram for ACE_POSIX_Asynch_Write_File:
Public Member Functions | |
ACE_POSIX_Asynch_Write_File (ACE_POSIX_Proactor *posix_proactor) | |
Constructor. | |
int | write (ACE_Message_Block &message_block, size_t bytes_to_write, u_long offset, u_long offset_high, const void *act, int priority, int signal_number=0) |
virtual | ~ACE_POSIX_Asynch_Write_File (void) |
Destructor. | |
Private Member Functions | |
int | write (ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, int priority, int signal_number=0) |
Definition at line 548 of file POSIX_Asynch_IO.h.
|
Constructor.
Definition at line 638 of file POSIX_Asynch_IO.cpp.
00639 : ACE_POSIX_Asynch_Write_Stream (posix_proactor) 00640 { 00641 } |
|
Destructor.
Definition at line 685 of file POSIX_Asynch_IO.cpp.
00686 { 00687 } |
|
This belongs to ACE_POSIX_Asynch_Write_Stream. We have put this here to avoid compiler warnings. We forward this method call to the <ACE_POSIX_Asynch_Write_Stream::write> one. Implements ACE_Asynch_Write_File_Impl. Definition at line 690 of file POSIX_Asynch_IO.cpp. References ACE_POSIX_Asynch_Write_Stream::write().
00695 { 00696 return ACE_POSIX_Asynch_Write_Stream::write (message_block, 00697 bytes_to_write, 00698 act, 00699 priority, 00700 signal_number); 00701 } |
|
This starts off an asynchronous write. Upto will be written and stored in the . The write will start at from the beginning of the file. Implements ACE_Asynch_Write_File_Impl. Definition at line 644 of file POSIX_Asynch_IO.cpp. References ACE_ERROR_RETURN, ACE_LIB_TEXT, ACE_NEW_RETURN, ACE_POSIX_Proactor::get_handle(), ACE_Message_Block::length(), LM_ERROR, ACE_POSIX_Asynch_Operation::posix_proactor(), and ACE_POSIX_Proactor::start_aio().
00651 { 00652 size_t len = message_block.length (); 00653 if (bytes_to_write > len) 00654 bytes_to_write = len; 00655 00656 if (bytes_to_write == 0) 00657 ACE_ERROR_RETURN 00658 ((LM_ERROR, 00659 ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_File::write:") 00660 ACE_LIB_TEXT ("Attempt to write 0 bytes\n")), 00661 -1); 00662 00663 ACE_POSIX_Asynch_Write_File_Result *result = 0; 00664 ACE_POSIX_Proactor *proactor = this->posix_proactor (); 00665 ACE_NEW_RETURN (result, 00666 ACE_POSIX_Asynch_Write_File_Result (this->handler_proxy_, 00667 this->handle_, 00668 message_block, 00669 bytes_to_write, 00670 act, 00671 offset, 00672 offset_high, 00673 proactor->get_handle (), 00674 priority, 00675 signal_number), 00676 -1); 00677 00678 int return_val = proactor->start_aio (result, ACE_POSIX_Proactor::ACE_OPCODE_WRITE); 00679 if (return_val == -1) 00680 delete result; 00681 00682 return return_val; 00683 } |