#include <POSIX_Asynch_IO.h>
Inheritance diagram for ACE_POSIX_Asynch_Write_Stream:
Public Member Functions | |
ACE_POSIX_Asynch_Write_Stream (ACE_POSIX_Proactor *posix_proactor) | |
Constructor. | |
int | write (ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, int priority, int signal_number=0) |
virtual | ~ACE_POSIX_Asynch_Write_Stream (void) |
Destructor. |
Definition at line 375 of file POSIX_Asynch_IO.h.
|
Constructor.
Definition at line 402 of file POSIX_Asynch_IO.cpp.
00403 : ACE_POSIX_Asynch_Operation (posix_proactor) 00404 { 00405 } |
|
Destructor.
Definition at line 445 of file POSIX_Asynch_IO.cpp.
00446 { 00447 } |
|
This starts off an asynchronous write. Upto will be written from the . Implements ACE_Asynch_Write_Stream_Impl. Reimplemented in ACE_POSIX_Asynch_Write_File. Definition at line 408 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(). Referenced by ACE_POSIX_Asynch_Transmit_Handler::handle_read_file(), ACE_POSIX_Asynch_Transmit_Handler::handle_write_stream(), ACE_POSIX_Asynch_Transmit_Handler::initiate_read_file(), ACE_POSIX_Asynch_Transmit_Handler::transmit(), and ACE_POSIX_Asynch_Write_File::write().
00413 { 00414 size_t len = message_block.length (); 00415 if (bytes_to_write > len) 00416 bytes_to_write = len; 00417 00418 if (bytes_to_write == 0) 00419 ACE_ERROR_RETURN 00420 ((LM_ERROR, 00421 ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_Stream::write:") 00422 ACE_LIB_TEXT ("Attempt to write 0 bytes\n")), 00423 -1); 00424 00425 ACE_POSIX_Asynch_Write_Stream_Result *result = 0; 00426 ACE_POSIX_Proactor *proactor = this->posix_proactor (); 00427 ACE_NEW_RETURN (result, 00428 ACE_POSIX_Asynch_Write_Stream_Result (this->handler_proxy_, 00429 this->handle_, 00430 message_block, 00431 bytes_to_write, 00432 act, 00433 proactor->get_handle (), 00434 priority, 00435 signal_number), 00436 -1); 00437 00438 int return_val = proactor->start_aio (result, ACE_POSIX_Proactor::ACE_OPCODE_WRITE); 00439 if (return_val == -1) 00440 delete result; 00441 00442 return return_val; 00443 } |