ACE 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
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]

Public Member Functions

 ACE_POSIX_Asynch_Transmit_Handler (ACE_POSIX_Proactor *posix_proactor, ACE_POSIX_Asynch_Transmit_File_Result *result)
 
 ~ACE_POSIX_Asynch_Transmit_Handler () override
 Destructor.
 
int transmit ()
 
- Public Member Functions inherited from ACE_Handler
 ACE_Handler ()
 A do nothing constructor.
 
 ACE_Handler (ACE_Proactor *p)
 A do nothing constructor which allows proactor to be set to <p>.
 
virtual ~ACE_Handler ()
 Virtual destruction.
 
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.
 
virtual void handle_connect (const ACE_Asynch_Connect::Result &result)
 This method will be called when an asynchronous connect completes.
 
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 ()
 
ACE_Proactorproactor ()
 Get the proactor associated with this handler.
 
void proactor (ACE_Proactor *p)
 Set the proactor.
 
virtual ACE_HANDLE handle () const
 
virtual void handle (ACE_HANDLE)
 Set the ACE_HANDLE value for this Handler.
 
Proxy_Ptrproxy ()
 

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_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.
 
- Protected Attributes inherited from ACE_Handler
ACE_Proactorproactor_
 The proactor associated with this handler.
 
ACE_HANDLE handle_
 The ACE_HANDLE in use with this handler.
 
ACE_Refcounted_Auto_Ptr< Proxy, ACE_SYNCH_MUTEXproxy_
 Refers to proxy for this handler.
 

Additional Inherited Members

- Public Types inherited from ACE_Handler
typedef ACE_Refcounted_Auto_Ptr< Proxy, ACE_SYNCH_MUTEXProxy_Ptr
 

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

◆ ACT

Enumerator
HEADER_ACT 
DATA_ACT 
TRAILER_ACT 

Constructor & Destructor Documentation

◆ ACE_POSIX_Asynch_Transmit_Handler()

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).

◆ ~ACE_POSIX_Asynch_Transmit_Handler()

ACE_POSIX_Asynch_Transmit_Handler::~ACE_POSIX_Asynch_Transmit_Handler ( )
override

Destructor.

Member Function Documentation

◆ handle_read_file()

void ACE_POSIX_Asynch_Transmit_Handler::handle_read_file ( const ACE_Asynch_Read_File::Result & result)
overrideprotectedvirtual

This is called when asynchronous reads from the file complete.

Reimplemented from ACE_Handler.

◆ handle_write_stream()

void ACE_POSIX_Asynch_Transmit_Handler::handle_write_stream ( const ACE_Asynch_Write_Stream::Result & result)
overrideprotectedvirtual

This is called when asynchronous writes from the socket complete.

Reimplemented from ACE_Handler.

◆ initiate_read_file()

int ACE_POSIX_Asynch_Transmit_Handler::initiate_read_file ( )
protected

Issue asynch read from the file.

◆ transmit()

int ACE_POSIX_Asynch_Transmit_Handler::transmit ( )

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

Member Data Documentation

◆ bytes_transferred_

size_t ACE_POSIX_Asynch_Transmit_Handler::bytes_transferred_
protected

Number of bytes transferred on the stream.

◆ data_act_

ACT ACE_POSIX_Asynch_Transmit_Handler::data_act_
protected

ACT to transmit data.

◆ file_offset_

size_t ACE_POSIX_Asynch_Transmit_Handler::file_offset_
protected

Current offset of the file being transmitted.

◆ file_size_

size_t ACE_POSIX_Asynch_Transmit_Handler::file_size_
protected

Total size of the file.

◆ header_act_

ACT ACE_POSIX_Asynch_Transmit_Handler::header_act_
protected

ACT to transmit header.

◆ mb_

ACE_Message_Block* ACE_POSIX_Asynch_Transmit_Handler::mb_
protected

Message bloack used to do the transmission.

◆ result_

ACE_POSIX_Asynch_Transmit_File_Result* ACE_POSIX_Asynch_Transmit_Handler::result_
protected

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

◆ rf_

ACE_POSIX_Asynch_Read_File ACE_POSIX_Asynch_Transmit_Handler::rf_
protected

To read from the file to be transmitted.

◆ trailer_act_

ACT ACE_POSIX_Asynch_Transmit_Handler::trailer_act_
protected

ACT to transmit trailer.

◆ ws_

ACE_POSIX_Asynch_Write_Stream ACE_POSIX_Asynch_Transmit_Handler::ws_
protected

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


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