Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_WIN32_Asynch_Transmit_File_Result Class Reference

This class implements ACE_Asynch_Transmit_File::Result for WIN32 platforms. More...

#include <WIN32_Asynch_IO.h>

Inheritance diagram for ACE_WIN32_Asynch_Transmit_File_Result:

Inheritance graph
[legend]
Collaboration diagram for ACE_WIN32_Asynch_Transmit_File_Result:

Collaboration graph
[legend]
List of all members.

Public Methods

ACE_HANDLE socket (void) const
 Socket used for transmitting the file. More...

ACE_HANDLE file (void) const
 File from which the data is read. More...

ACE_Asynch_Transmit_File::Header_And_Trailerheader_and_trailer (void) const
 Header and trailer data associated with this transmit file. More...

size_t bytes_to_write (void) const
 The number of bytes which were requested at the start of the asynchronous transmit file. More...

size_t bytes_per_send (void) const
 Number of bytes per send requested at the start of the transmit file. More...

u_long flags (void) const
 Flags which were passed into transmit file. More...

size_t bytes_transferred (void) const
 Number of bytes transferred by the operation. More...

const void * act (void) const
 ACT associated with the operation. More...

int success (void) const
 Did the operation succeed? More...

const void * completion_key (void) const
u_long error (void) const
 Error value if the operation fail. More...

ACE_HANDLE event (void) const
 Event associated with the OVERLAPPED structure. More...

u_long offset (void) const
 This really make sense only when doing file I/O. More...

u_long offset_high (void) const
 Offset_high associated with the OVERLAPPED structure. More...

int priority (void) const
 The priority of the asynchronous operation. Currently, this is not supported on Win32. More...

int signal_number (void) const
 No-op. Returns 0. More...

int post_completion (ACE_Proactor_Impl *proactor)
 Post <this> to the Proactor's completion port. More...


Protected Methods

 ACE_WIN32_Asynch_Transmit_File_Result (ACE_Handler &handler, ACE_HANDLE socket, ACE_HANDLE file, ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer, size_t bytes_to_write, u_long offset, u_long offset_high, size_t bytes_per_send, u_long flags, const void *act, ACE_HANDLE event, int priority, int signal_number=0)
 Constructor is protected since creation is limited to ACE_Asynch_Transmit_File factory. More...

virtual void complete (size_t bytes_transferred, int success, const void *completion_key, u_long error)
 Proactor will call this method when the write completes. More...

virtual ~ACE_WIN32_Asynch_Transmit_File_Result (void)
 Destructor. More...


Protected Attributes

ACE_HANDLE socket_
 Network I/O handle. More...

ACE_HANDLE file_
 File I/O handle. More...

ACE_Asynch_Transmit_File::Header_And_Trailerheader_and_trailer_
 Header and trailer data associated with this transmit file. More...

size_t bytes_to_write_
 The number of bytes which were requested at the start of the asynchronous transmit file. More...

size_t bytes_per_send_
 Number of bytes per send requested at the start of the transmit file. More...

u_long flags_
 Flags which were passed into transmit file. More...


Friends

class ACE_WIN32_Asynch_Transmit_File
 Factory class will have special permission. More...

class ACE_WIN32_Proactor
 Proactor class has special permission. More...


Detailed Description

This class implements ACE_Asynch_Transmit_File::Result for WIN32 platforms.

This class has all the information necessary for the <handler> to uniquiely identify the completion of the asynchronous transmit file.

Definition at line 1368 of file WIN32_Asynch_IO.h.


Constructor & Destructor Documentation

ACE_WIN32_Asynch_Transmit_File_Result::ACE_WIN32_Asynch_Transmit_File_Result ACE_Handler   handler,
ACE_HANDLE    socket,
ACE_HANDLE    file,
ACE_Asynch_Transmit_File::Header_And_Trailer   header_and_trailer,
size_t    bytes_to_write,
u_long    offset,
u_long    offset_high,
size_t    bytes_per_send,
u_long    flags,
const void *    act,
ACE_HANDLE    event,
int    priority,
int    signal_number = 0
[protected]
 

Constructor is protected since creation is limited to ACE_Asynch_Transmit_File factory.

Definition at line 2809 of file WIN32_Asynch_IO.cpp.

ACE_WIN32_Asynch_Transmit_File_Result::~ACE_WIN32_Asynch_Transmit_File_Result void    [protected, virtual]
 

Destructor.

Definition at line 2869 of file WIN32_Asynch_IO.cpp.

02870 {
02871 }


Member Function Documentation

const void * ACE_WIN32_Asynch_Transmit_File_Result::act void    const [virtual]
 

ACT associated with the operation.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2883 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::act.

02884 {
02885   return ACE_WIN32_Asynch_Result::act ();
02886 }

size_t ACE_WIN32_Asynch_Transmit_File_Result::bytes_per_send void    const [virtual]
 

Number of bytes per send requested at the start of the transmit file.

Implements ACE_Asynch_Transmit_File_Result_Impl.

Definition at line 2798 of file WIN32_Asynch_IO.cpp.

References bytes_per_send_.

02799 {
02800   return this->bytes_per_send_;
02801 }

size_t ACE_WIN32_Asynch_Transmit_File_Result::bytes_to_write void    const [virtual]
 

The number of bytes which were requested at the start of the asynchronous transmit file.

Implements ACE_Asynch_Transmit_File_Result_Impl.

Definition at line 2792 of file WIN32_Asynch_IO.cpp.

References bytes_to_write_.

02793 {
02794   return this->bytes_to_write_;
02795 }

size_t ACE_WIN32_Asynch_Transmit_File_Result::bytes_transferred void    const [virtual]
 

Number of bytes transferred by the operation.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2877 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::bytes_transferred.

Referenced by complete.

02878 {
02879   return ACE_WIN32_Asynch_Result::bytes_transferred ();
02880 }

void ACE_WIN32_Asynch_Transmit_File_Result::complete size_t    bytes_transferred,
int    success,
const void *    completion_key,
u_long    error
[protected, virtual]
 

Proactor will call this method when the write completes.

Implements ACE_Asynch_Result_Impl.

Definition at line 2835 of file WIN32_Asynch_IO.cpp.

References bytes_transferred, ACE_WIN32_Asynch_Result::bytes_transferred_, completion_key, ACE_WIN32_Asynch_Result::completion_key_, error, ACE_WIN32_Asynch_Result::error_, ACE_Handler::handle_transmit_file, ACE_WIN32_Asynch_Result::handler_, success, and ACE_WIN32_Asynch_Result::success_.

02839 {
02840   // Copy the data which was returned by GetQueuedCompletionStatus
02841   this->bytes_transferred_ = bytes_transferred;
02842   this->success_ = success;
02843   this->completion_key_ = completion_key;
02844   this->error_ = error;
02845 
02846   // We will not do this because (a) the header and trailer blocks may
02847   // be the same message_blocks and (b) in cases of failures we have
02848   // no idea how much of what (header, data, trailer) was sent.
02849   /*
02850     if (this->success_ && this->header_and_trailer_ != 0)
02851     {
02852     ACE_Message_Block *header = this->header_and_trailer_->header ();
02853     if (header != 0)
02854     header->rd_ptr (this->header_and_trailer_->header_bytes ());
02855 
02856     ACE_Message_Block *trailer = this->header_and_trailer_->trailer ();
02857     if (trailer != 0)
02858     trailer->rd_ptr (this->header_and_trailer_->trailer_bytes ());
02859     }
02860   */
02861 
02862   // Create the interface result class.
02863   ACE_Asynch_Transmit_File::Result result (this);
02864 
02865   // Call the application handler.
02866   this->handler_.handle_transmit_file (result);
02867 }

const void * ACE_WIN32_Asynch_Transmit_File_Result::completion_key void    const [virtual]
 

This returns the ACT associated with the handle when it was registered with the I/O completion port. This ACT is not the same as the ACT associated with the asynchronous operation.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2895 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::completion_key.

Referenced by complete.

02896 {
02897   return ACE_WIN32_Asynch_Result::completion_key ();
02898 }

u_long ACE_WIN32_Asynch_Transmit_File_Result::error void    const [virtual]
 

Error value if the operation fail.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2901 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::error.

Referenced by complete.

02902 {
02903   return ACE_WIN32_Asynch_Result::error ();
02904 }

ACE_HANDLE ACE_WIN32_Asynch_Transmit_File_Result::event void    const [virtual]
 

Event associated with the OVERLAPPED structure.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2907 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::event.

02908 {
02909   return ACE_WIN32_Asynch_Result::event ();
02910 }

ACE_HANDLE ACE_WIN32_Asynch_Transmit_File_Result::file void    const [virtual]
 

File from which the data is read.

Implements ACE_Asynch_Transmit_File_Result_Impl.

Definition at line 2780 of file WIN32_Asynch_IO.cpp.

References file_.

Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.

02781 {
02782   return this->file_;
02783 }

u_long ACE_WIN32_Asynch_Transmit_File_Result::flags void    const [virtual]
 

Flags which were passed into transmit file.

Implements ACE_Asynch_Transmit_File_Result_Impl.

Definition at line 2804 of file WIN32_Asynch_IO.cpp.

References flags_.

Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.

02805 {
02806   return this->flags_;
02807 }

ACE_Asynch_Transmit_File::Header_And_Trailer * ACE_WIN32_Asynch_Transmit_File_Result::header_and_trailer void    const [virtual]
 

Header and trailer data associated with this transmit file.

Implements ACE_Asynch_Transmit_File_Result_Impl.

Definition at line 2786 of file WIN32_Asynch_IO.cpp.

References header_and_trailer_.

Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.

02787 {
02788   return this->header_and_trailer_;
02789 }

u_long ACE_WIN32_Asynch_Transmit_File_Result::offset void    const [virtual]
 

This really make sense only when doing file I/O.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2913 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::offset.

02914 {
02915   return ACE_WIN32_Asynch_Result::offset ();
02916 }

u_long ACE_WIN32_Asynch_Transmit_File_Result::offset_high void    const [virtual]
 

Offset_high associated with the OVERLAPPED structure.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2919 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::offset_high.

02920 {
02921   return ACE_WIN32_Asynch_Result::offset_high ();
02922 }

int ACE_WIN32_Asynch_Transmit_File_Result::post_completion ACE_Proactor_Impl   proactor [virtual]
 

Post <this> to the Proactor's completion port.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2937 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::post_completion.

02938 {
02939   return ACE_WIN32_Asynch_Result::post_completion (proactor);
02940 }

int ACE_WIN32_Asynch_Transmit_File_Result::priority void    const [virtual]
 

The priority of the asynchronous operation. Currently, this is not supported on Win32.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2925 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::priority.

02926 {
02927   return ACE_WIN32_Asynch_Result::priority ();
02928 }

int ACE_WIN32_Asynch_Transmit_File_Result::signal_number void    const [virtual]
 

No-op. Returns 0.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2931 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::signal_number.

02932 {
02933   return ACE_WIN32_Asynch_Result::signal_number ();
02934 }

ACE_HANDLE ACE_WIN32_Asynch_Transmit_File_Result::socket void    const [virtual]
 

Socket used for transmitting the file.

Implements ACE_Asynch_Transmit_File_Result_Impl.

Definition at line 2774 of file WIN32_Asynch_IO.cpp.

References socket_.

Referenced by ACE_WIN32_Asynch_Transmit_File::transmit_file.

02775 {
02776   return this->socket_;
02777 }

int ACE_WIN32_Asynch_Transmit_File_Result::success void    const [virtual]
 

Did the operation succeed?

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 2889 of file WIN32_Asynch_IO.cpp.

References ACE_WIN32_Asynch_Result::success.

Referenced by complete.

02890 {
02891   return ACE_WIN32_Asynch_Result::success ();
02892 }


Friends And Related Function Documentation

friend class ACE_WIN32_Asynch_Transmit_File [friend]
 

Factory class will have special permission.

Definition at line 1372 of file WIN32_Asynch_IO.h.

friend class ACE_WIN32_Proactor [friend]
 

Proactor class has special permission.

Reimplemented from ACE_WIN32_Asynch_Result.

Definition at line 1375 of file WIN32_Asynch_IO.h.


Member Data Documentation

size_t ACE_WIN32_Asynch_Transmit_File_Result::bytes_per_send_ [protected]
 

Number of bytes per send requested at the start of the transmit file.

Definition at line 1480 of file WIN32_Asynch_IO.h.

Referenced by bytes_per_send.

size_t ACE_WIN32_Asynch_Transmit_File_Result::bytes_to_write_ [protected]
 

The number of bytes which were requested at the start of the asynchronous transmit file.

Definition at line 1476 of file WIN32_Asynch_IO.h.

Referenced by bytes_to_write.

ACE_HANDLE ACE_WIN32_Asynch_Transmit_File_Result::file_ [protected]
 

File I/O handle.

Definition at line 1469 of file WIN32_Asynch_IO.h.

Referenced by file.

u_long ACE_WIN32_Asynch_Transmit_File_Result::flags_ [protected]
 

Flags which were passed into transmit file.

Definition at line 1483 of file WIN32_Asynch_IO.h.

Referenced by flags.

ACE_Asynch_Transmit_File::Header_And_Trailer* ACE_WIN32_Asynch_Transmit_File_Result::header_and_trailer_ [protected]
 

Header and trailer data associated with this transmit file.

Definition at line 1472 of file WIN32_Asynch_IO.h.

Referenced by header_and_trailer.

ACE_HANDLE ACE_WIN32_Asynch_Transmit_File_Result::socket_ [protected]
 

Network I/O handle.

Definition at line 1466 of file WIN32_Asynch_IO.h.

Referenced by socket.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:00:31 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002