ACE
6.2.8
|
Auxillary handler for doing <Asynch_Transmit_File> in Unix. <ACE_POSIX_Asynch_Transmit_File> internally uses this. More...
Public Member Functions | |
ACE_POSIX_Asynch_Transmit_Handler (ACE_POSIX_Proactor *posix_proactor, ACE_POSIX_Asynch_Transmit_File_Result *result) | |
virtual | ~ACE_POSIX_Asynch_Transmit_Handler (void) |
Destructor. More... | |
int | transmit (void) |
Public Member Functions inherited from ACE_Handler | |
ACE_Handler (void) | |
A do nothing constructor. More... | |
ACE_Handler (ACE_Proactor *p) | |
A do nothing constructor which allows proactor to be set to <p>. More... | |
virtual | ~ACE_Handler (void) |
Virtual destruction. More... | |
virtual void | handle_read_stream (const ACE_Asynch_Read_Stream::Result &result) |
virtual void | handle_write_dgram (const ACE_Asynch_Write_Dgram::Result &result) |
virtual void | handle_read_dgram (const ACE_Asynch_Read_Dgram::Result &result) |
virtual void | handle_write_file (const ACE_Asynch_Write_File::Result &result) |
virtual void | handle_accept (const ACE_Asynch_Accept::Result &result) |
This method will be called when an asynchronous accept completes. More... | |
virtual void | handle_connect (const ACE_Asynch_Connect::Result &result) |
This method will be called when an asynchronous connect completes. More... | |
virtual void | handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result) |
virtual void | handle_time_out (const ACE_Time_Value &tv, const void *act=0) |
virtual void | handle_wakeup (void) |
ACE_Proactor * | proactor (void) |
Get the proactor associated with this handler. More... | |
void | proactor (ACE_Proactor *p) |
Set the proactor. More... | |
virtual ACE_HANDLE | handle (void) const |
virtual void | handle (ACE_HANDLE) |
Set the ACE_HANDLE value for this Handler. More... | |
Proxy_Ptr & | proxy (void) |
Protected Types | |
enum | ACT { HEADER_ACT = 1, DATA_ACT = 2, TRAILER_ACT = 3 } |
Protected Member Functions | |
virtual void | handle_write_stream (const ACE_Asynch_Write_Stream::Result &result) |
This is called when asynchronous writes from the socket complete. More... | |
virtual void | handle_read_file (const ACE_Asynch_Read_File::Result &result) |
This is called when asynchronous reads from the file complete. More... | |
int | initiate_read_file (void) |
Issue asynch read from the file. More... | |
Protected Attributes | |
ACE_POSIX_Asynch_Transmit_File_Result * | result_ |
ACE_Message_Block * | mb_ |
Message bloack used to do the transmission. More... | |
ACT | header_act_ |
ACT to transmit header. More... | |
ACT | data_act_ |
ACT to transmit data. More... | |
ACT | trailer_act_ |
ACT to transmit trailer. More... | |
size_t | file_offset_ |
Current offset of the file being transmitted. More... | |
size_t | file_size_ |
Total size of the file. More... | |
size_t | bytes_transferred_ |
Number of bytes transferred on the stream. More... | |
ACE_POSIX_Asynch_Read_File | rf_ |
To read from the file to be transmitted. More... | |
ACE_POSIX_Asynch_Write_Stream | ws_ |
Write stream to write the header, trailer and the data. More... | |
Protected Attributes inherited from ACE_Handler | |
ACE_Proactor * | proactor_ |
The proactor associated with this handler. More... | |
ACE_HANDLE | handle_ |
The ACE_HANDLE in use with this handler. More... | |
ACE_Refcounted_Auto_Ptr< Proxy, ACE_SYNCH_MUTEX > | proxy_ |
Refers to proxy for this handler. More... | |
Additional Inherited Members | |
Public Types inherited from ACE_Handler | |
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).
|
virtual |
Destructor.
|
protectedvirtual |
This is called when asynchronous reads from the file complete.
Reimplemented from ACE_Handler.
|
protectedvirtual |
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 | ( | void | ) |
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.