ACE  6.1.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
ACE_POSIX_Asynch_Transmit_Handler Class Reference

Auxillary handler for doing <Asynch_Transmit_File> in Unix. <ACE_POSIX_Asynch_Transmit_File> internally uses this. More...

Inheritance diagram for ACE_POSIX_Asynch_Transmit_Handler:
Inheritance graph
[legend]
Collaboration diagram for ACE_POSIX_Asynch_Transmit_Handler:
Collaboration graph
[legend]

List of all members.

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.
int transmit (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.
virtual void handle_read_file (const ACE_Asynch_Read_File::Result &result)
 This is called when asynchronous reads from the file complete.
int initiate_read_file (void)
 Issue asynch read from the file.

Protected Attributes

ACE_POSIX_Asynch_Transmit_File_Resultresult_
ACE_Message_Blockmb_
 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.

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
HEADER_ACT 
DATA_ACT 
TRAILER_ACT 

Constructor & Destructor Documentation

Constructor. Result pointer will have all the information to do the file transmission (socket, file, application handler, bytes to write).

Destructor.


Member Function Documentation

This is called when asynchronous reads from the file complete.

Reimplemented from ACE_Handler.

This is called when asynchronous writes from the socket complete.

Reimplemented from ACE_Handler.

Issue asynch read from the file.

Do the transmission. All the info to do the transmission is in the <result> member.


Member Data Documentation

Number of bytes transferred on the stream.

ACT to transmit data.

Current offset of the file being transmitted.

Total size of the file.

ACT to transmit header.

Message bloack used to do the transmission.

The asynch result pointer made from the initial transmit file request.

To read from the file to be transmitted.

ACT to transmit trailer.

Write stream to write the header, trailer and the data.


The documentation for this class was generated from the following file: