ACE 8.0.0
|
Auxillary handler for doing <Asynch_Transmit_File> in Unix. <ACE_POSIX_Asynch_Transmit_File> internally uses this. More...
Protected Types | |
enum | ACT { HEADER_ACT = 1 , DATA_ACT = 2 , TRAILER_ACT = 3 } |
Protected Member Functions | |
void | handle_write_stream (const ACE_Asynch_Write_Stream::Result &result) override |
This is called when asynchronous writes from the socket complete. | |
void | handle_read_file (const ACE_Asynch_Read_File::Result &result) override |
This is called when asynchronous reads from the file complete. | |
int | initiate_read_file () |
Issue asynch read from the file. | |
Protected Attributes | |
ACE_POSIX_Asynch_Transmit_File_Result * | result_ |
ACE_Message_Block * | mb_ |
Message bloack used to do the transmission. | |
ACT | header_act_ |
ACT to transmit header. | |
ACT | data_act_ |
ACT to transmit data. | |
ACT | trailer_act_ |
ACT to transmit trailer. | |
size_t | file_offset_ |
Current offset of the file being transmitted. | |
size_t | file_size_ |
Total size of the file. | |
size_t | bytes_transferred_ |
Number of bytes transferred on the stream. | |
ACE_POSIX_Asynch_Read_File | rf_ |
To read from the file to be transmitted. | |
ACE_POSIX_Asynch_Write_Stream | ws_ |
Write stream to write the header, trailer and the data. | |
![]() | |
ACE_Proactor * | proactor_ |
The proactor associated with this handler. | |
ACE_HANDLE | handle_ |
The ACE_HANDLE in use with this handler. | |
ACE_Refcounted_Auto_Ptr< Proxy, ACE_SYNCH_MUTEX > | proxy_ |
Refers to proxy for this handler. | |
Additional Inherited Members | |
![]() | |
typedef ACE_Refcounted_Auto_Ptr< Proxy, ACE_SYNCH_MUTEX > | Proxy_Ptr |
Auxillary handler for doing <Asynch_Transmit_File> in Unix. <ACE_POSIX_Asynch_Transmit_File> internally uses this.
This is a helper class for implementing <ACE_POSIX_Asynch_Transmit_File> in Unix systems.
|
protected |
ACE_POSIX_Asynch_Transmit_Handler::ACE_POSIX_Asynch_Transmit_Handler | ( | ACE_POSIX_Proactor * | posix_proactor, |
ACE_POSIX_Asynch_Transmit_File_Result * | result ) |
Constructor. Result pointer will have all the information to do the file transmission (socket, file, application handler, bytes to write).
|
override |
Destructor.
|
overrideprotectedvirtual |
This is called when asynchronous reads from the file complete.
Reimplemented from ACE_Handler.
|
overrideprotectedvirtual |
This is called when asynchronous writes from the socket complete.
Reimplemented from ACE_Handler.
|
protected |
Issue asynch read from the file.
int ACE_POSIX_Asynch_Transmit_Handler::transmit | ( | ) |
Do the transmission. All the info to do the transmission is in the <result> member.
|
protected |
Number of bytes transferred on the stream.
|
protected |
ACT to transmit data.
|
protected |
Current offset of the file being transmitted.
|
protected |
Total size of the file.
|
protected |
ACT to transmit header.
|
protected |
Message bloack used to do the transmission.
|
protected |
The asynch result pointer made from the initial transmit file request.
|
protected |
To read from the file to be transmitted.
|
protected |
ACT to transmit trailer.
|
protected |
Write stream to write the header, trailer and the data.