POSIX_Asynch_IO.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    POSIX_Asynch_IO.h
00006  *
00007  *  $Id: POSIX_Asynch_IO.h 80826 2008-03-04 14:51:23Z wotte $
00008  *
00009  *  The implementation classes for POSIX implementation of Asynch
00010  *  Operations are defined here in this file.
00011  *
00012  *  @author Irfan Pyarali <irfan@cs.wustl.edu>
00013  *  @author Tim Harrison <harrison@cs.wustl.edu>
00014  *  @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
00015  *  @author Roger Tragin <r.tragin@computer.org>
00016  *  @author Alexander Libman <alibman@baltimore.com>
00017  */
00018 //=============================================================================
00019 
00020 #ifndef ACE_POSIX_ASYNCH_IO_H
00021 #define ACE_POSIX_ASYNCH_IO_H
00022 
00023 #include /**/ "ace/config-all.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 #pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 #if defined (ACE_HAS_AIO_CALLS)
00030 
00031 #include "ace/os_include/os_aio.h"
00032 
00033 #include "ace/Asynch_IO_Impl.h"
00034 #include "ace/Unbounded_Queue.h"
00035 #include "ace/Map_Manager.h"
00036 #include "ace/Event_Handler.h"
00037 #if defined(INTEGRITY)
00038 #include "ace/ACE.h"
00039 #endif
00040 
00041 #include "ace/Null_Mutex.h"
00042 
00043 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00044 
00045 // Forward declarations
00046 class ACE_POSIX_Proactor;
00047 class ACE_Proactor_Impl;
00048 class ACE_Handle_Set;
00049 
00050 /**
00051  * @class ACE_POSIX_Asynch_Result
00052  *
00053  * This class provides concrete implementation for ACE_Asynch_Result
00054  * for POSIX4 platforms. This class extends @c aiocb and makes it more
00055  * useful.
00056  */
00057 class ACE_Export ACE_POSIX_Asynch_Result : public virtual ACE_Asynch_Result_Impl,
00058                                            public aiocb
00059 {
00060 public:
00061   /// Number of bytes transferred by the operation.
00062   size_t bytes_transferred (void) const;
00063 
00064   /// ACT associated with the operation.
00065   const void *act (void) const;
00066 
00067   /// Did the operation succeed?
00068   int success (void) const;
00069 
00070   /**
00071    * This is the ACT associated with the handle on which the
00072    * Asynch_Operation takes place.
00073    *
00074    * @note This is not implemented for POSIX4 platforms.
00075    */
00076   const void *completion_key (void) const;
00077 
00078   /// Error value if the operation fails.
00079   u_long error (void) const;
00080 
00081   /// This returns ACE_INVALID_HANDLE on POSIX4 platforms.
00082   ACE_HANDLE event (void) const;
00083 
00084   /**
00085    * This really make sense only when doing file I/O.
00086    *
00087    * @@ On POSIX4-Unix, offset_high should be supported using
00088    *     aiocb64.
00089    *
00090    */
00091   u_long offset (void) const;
00092   u_long offset_high (void) const;
00093 
00094   /// Priority of the operation.
00095   int priority (void) const;
00096 
00097   /**
00098    * POSIX4 realtime signal number to be used for the
00099    * operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
00100    * default, SIGRTMIN is used to issue <aio_> calls.
00101    */
00102   int signal_number (void) const;
00103 
00104   /// Post @c this to the Proactor.
00105   int post_completion (ACE_Proactor_Impl *proactor);
00106 
00107   /// Destructor.
00108   virtual ~ACE_POSIX_Asynch_Result (void);
00109 
00110   /// Simulate error value to use in the post_completion ()
00111   void set_error (u_long errcode);
00112 
00113   /// Simulate value to use in the post_completion ()
00114   void set_bytes_transferred (size_t nbytes);
00115 
00116 protected:
00117   /// Constructor. <Event> is not used on POSIX.
00118   ACE_POSIX_Asynch_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00119                            const void* act,
00120                            ACE_HANDLE event,
00121                            u_long offset,
00122                            u_long offset_high,
00123                            int priority,
00124                            int signal_number);
00125 
00126   /// Handler that will be called back.
00127   ACE_Handler::Proxy_Ptr handler_proxy_;
00128 
00129   /**
00130    * ACT for this operation.
00131    * We could use <aiocb::aio_sigevent.sigev_value.sival_ptr> for
00132    * this. But it doesnot provide the constness, so this may be
00133    * better.
00134    */
00135   const void *act_;
00136 
00137   /// Bytes transferred by this operation.
00138   size_t bytes_transferred_;
00139 
00140   /// Success indicator.
00141   int success_;
00142 
00143   /// ACT associated with handle.
00144   const void *completion_key_;
00145 
00146   /// Error if operation failed.
00147   u_long error_;
00148 };
00149 
00150 /**
00151  * @class ACE_POSIX_Asynch_Operation
00152  *
00153  * @brief This class implements ACE_Asynch_Operation for all
00154  * implementations of Proactor (AIOCB, SIG, SUN)
00155  * Specific future implementations can derive from this class.
00156  */
00157 class ACE_Export ACE_POSIX_Asynch_Operation : public virtual ACE_Asynch_Operation_Impl
00158 {
00159 public:
00160   /**
00161    * Initializes the factory with information which will be used with
00162    * each asynchronous call.  If (@a handle == ACE_INVALID_HANDLE),
00163    * @c ACE_Handler::handle will be called on the handler to get the
00164    * correct handle. No need for the Proactor since the sub classes
00165    * will know the correct implementation Proactor class, since this
00166    * Operation class itself was created by the correct implementation
00167    * Proactor class.
00168    */
00169   int open (const ACE_Handler::Proxy_Ptr &handler_proxy,
00170             ACE_HANDLE handle,
00171             const void *completion_key,
00172             ACE_Proactor *proactor = 0);
00173 
00174   /// Check the documentation for ACE_Asynch_Operation::cancel.
00175   int cancel (void);
00176 
00177   // = Access methods.
00178 
00179   /// Return the underlying proactor.
00180   ACE_Proactor* proactor (void) const;
00181 
00182   /// Return the underlying Proactor implementation.
00183   ACE_POSIX_Proactor * posix_proactor (void) const;
00184 
00185 protected:
00186   /// Contructor.
00187   ACE_POSIX_Asynch_Operation (ACE_POSIX_Proactor *posix_proactor);
00188 
00189   /// Destructor.
00190   virtual ~ACE_POSIX_Asynch_Operation (void);
00191 
00192   // This call is for the POSIX implementation. This method is used by
00193   // ACE_Asynch_Operation to store some information with the
00194   // Proactor after an <aio_> call is issued, so that the Proactor can
00195   // retreve this information to do <aio_return> and <aio_error>.
00196   // Passing a '0' ptr returns the status, indicating whether there
00197   // are slots available or no. Passing a valid ptr stores the ptr
00198   // with the Proactor.
00199 
00200   /**
00201    * It is easy to get this specific implementation proactor here,
00202    * since it is the one that creates the correct POSIX_Asynch_*
00203    * objects. We can use this to get to the implementation proactor
00204    * directly.
00205    */
00206   ACE_POSIX_Proactor *posix_proactor_;
00207 
00208   /// Proactor that this Asynch IO will be registered with.
00209   ACE_Proactor *proactor_;
00210 
00211   /// Handler that will receive the callback.
00212   ACE_Handler::Proxy_Ptr handler_proxy_;
00213 
00214   /// I/O handle used for reading.
00215   ACE_HANDLE handle_;
00216 };
00217 
00218 /**
00219  * @class ACE_POSIX_Asynch_Read_Stream_Result
00220  *
00221  * @brief This class provides concrete implementation for
00222  *    <ACE_Asynch_Read_Stream::Result> class for POSIX platforms.
00223  */
00224 class ACE_Export ACE_POSIX_Asynch_Read_Stream_Result : public virtual ACE_Asynch_Read_Stream_Result_Impl,
00225                                                        public ACE_POSIX_Asynch_Result
00226 {
00227 
00228   /// Factory classes will have special permissions.
00229   friend class ACE_POSIX_Asynch_Read_Stream;
00230 
00231   /// The Proactor constructs the Result class for faking results.
00232   friend class ACE_POSIX_Proactor;
00233 
00234 public:
00235   /// The number of bytes which were requested at the start of the
00236   /// asynchronous read.
00237   size_t bytes_to_read (void) const;
00238 
00239   /// Message block which contains the read data.
00240   ACE_Message_Block &message_block (void) const;
00241 
00242   /// I/O handle used for reading.
00243   ACE_HANDLE handle (void) const;
00244 
00245 protected:
00246   ACE_POSIX_Asynch_Read_Stream_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00247                                        ACE_HANDLE handle,
00248                                        ACE_Message_Block &message_block,
00249                                        size_t bytes_to_read,
00250                                        const void* act,
00251                                        ACE_HANDLE event,
00252                                        int priority,
00253                                        int signal_number);
00254   // Constructor is protected since creation is limited to
00255   // ACE_Asynch_Read_Stream factory.
00256 
00257   /// Get the data copied to this class, before calling application
00258   /// handler.
00259   virtual void complete (size_t bytes_transferred,
00260                          int success,
00261                          const void *completion_key,
00262                          u_long error);
00263 
00264   /// Destructor.
00265   virtual ~ACE_POSIX_Asynch_Read_Stream_Result (void);
00266 
00267   // aiocb::aio_nbytes
00268   // Bytes requested when the asynchronous read was initiated.
00269 
00270   /// Message block for reading the data into.
00271   ACE_Message_Block &message_block_;
00272 
00273   // aiocb::aio_filedes
00274   // I/O handle used for reading.
00275 };
00276 
00277 /**
00278  * @class ACE_POSIX_Asynch_Read_Stream
00279  *
00280  * This class implements <ACE_Asynch_Read_Stream> for all POSIX
00281  * based implementation of Proactor.
00282  *
00283  */
00284 class ACE_Export ACE_POSIX_Asynch_Read_Stream : public virtual ACE_Asynch_Read_Stream_Impl,
00285                                                 public ACE_POSIX_Asynch_Operation
00286 {
00287 public:
00288   /// Constructor.
00289   ACE_POSIX_Asynch_Read_Stream (ACE_POSIX_Proactor *posix_proactor);
00290 
00291   /// This starts off an asynchronous read.  Upto @a bytes_to_read will
00292   /// be read and stored in the @a message_block.
00293   int read (ACE_Message_Block &message_block,
00294             size_t bytes_to_read,
00295             const void *act,
00296             int priority,
00297             int signal_number = 0);
00298 
00299   /// Destructor.
00300   virtual ~ACE_POSIX_Asynch_Read_Stream (void);
00301 };
00302 
00303 
00304 /**
00305  * @class ACE_POSIX_Asynch_Write_Stream_Result
00306  *
00307  * @brief This class provides concrete implementation for
00308  *     <ACE_Asynch_Write_Stream::Result> on POSIX platforms.
00309  *
00310  *
00311  *     This class has all the information necessary for the
00312  *     @c handler to uniquiely identify the completion of the
00313  *     asynchronous write.
00314  */
00315 class ACE_Export ACE_POSIX_Asynch_Write_Stream_Result : public virtual ACE_Asynch_Write_Stream_Result_Impl,
00316                                                         public ACE_POSIX_Asynch_Result
00317 {
00318   /// Factory classes will have special privilages.
00319   friend class ACE_POSIX_Asynch_Write_Stream;
00320 
00321   /// The Proactor constructs the Result class for faking results.
00322   friend class ACE_POSIX_Proactor;
00323 
00324 public:
00325   /// The number of bytes which were requested at the start of the
00326   /// asynchronous write.
00327   size_t bytes_to_write (void) const;
00328 
00329   /// Message block that contains the data to be written.
00330   ACE_Message_Block &message_block (void) const;
00331 
00332   /// I/O handle used for writing.
00333   ACE_HANDLE handle (void) const;
00334 
00335 protected:
00336   /// Constructor is protected since creation is limited to
00337   /// ACE_Asynch_Write_Stream factory.
00338   ACE_POSIX_Asynch_Write_Stream_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00339                                         ACE_HANDLE handle,
00340                                         ACE_Message_Block &message_block,
00341                                         size_t bytes_to_write,
00342                                         const void* act,
00343                                         ACE_HANDLE event,
00344                                         int priority,
00345                                         int signal_number);
00346 
00347   /// ACE_Proactor will call this method when the write completes.
00348   virtual void complete (size_t bytes_transferred,
00349                          int success,
00350                          const void *completion_key,
00351                          u_long error);
00352 
00353   /// Destructor.
00354   virtual ~ACE_POSIX_Asynch_Write_Stream_Result (void);
00355 
00356 protected:
00357   // aiocb::aio_nbytes
00358   // The number of bytes which were requested at the start of the
00359   // asynchronous write.
00360 
00361   /// Message block that contains the data to be written.
00362   ACE_Message_Block &message_block_;
00363 
00364   // aiocb::aio_filedes
00365   // I/O handle used for writing.
00366 };
00367 
00368 /**
00369  * @class ACE_POSIX_Asynch_Write_Stream
00370  *
00371  * @brief This class implements <ACE_Asynch_Write_Stream> for
00372  *  all POSIX implementations of ACE_Proactor.
00373  */
00374 class ACE_Export ACE_POSIX_Asynch_Write_Stream : public virtual ACE_Asynch_Write_Stream_Impl,
00375                                                  public ACE_POSIX_Asynch_Operation
00376 {
00377 public:
00378   /// Constructor.
00379   ACE_POSIX_Asynch_Write_Stream (ACE_POSIX_Proactor *posix_proactor);
00380 
00381   /// This starts off an asynchronous write.  Upto @a bytes_to_write
00382   /// will be written from the @a message_block.
00383   int write (ACE_Message_Block &message_block,
00384              size_t bytes_to_write,
00385              const void *act,
00386              int priority,
00387              int signal_number = 0);
00388 
00389   /// Destructor.
00390   virtual ~ACE_POSIX_Asynch_Write_Stream (void);
00391 };
00392 
00393 /**
00394  * @class ACE_POSIX_Asynch_Read_File_Result
00395  *
00396  * @brief This class provides concrete implementation for
00397  *     <ACE_Asynch_Read_File::Result> class for POSIX platforms.
00398  */
00399 class ACE_Export ACE_POSIX_Asynch_Read_File_Result : public virtual ACE_Asynch_Read_File_Result_Impl,
00400                                                      public ACE_POSIX_Asynch_Read_Stream_Result
00401 {
00402   /// Factory classes will have special permissions.
00403   friend class ACE_POSIX_Asynch_Read_File;
00404 
00405   /// The Proactor constructs the Result class for faking results.
00406   friend class ACE_POSIX_Proactor;
00407 
00408 public:
00409 
00410 protected:
00411   /// Constructor is protected since creation is limited to
00412   /// ACE_Asynch_Read_File factory.
00413   ACE_POSIX_Asynch_Read_File_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00414                                      ACE_HANDLE handle,
00415                                      ACE_Message_Block &message_block,
00416                                      size_t bytes_to_read,
00417                                      const void* act,
00418                                      u_long offset,
00419                                      u_long offset_high,
00420                                      ACE_HANDLE event,
00421                                      int priority,
00422                                      int signal_number);
00423 
00424   /// ACE_Proactor will call this method when the read completes.
00425   virtual void complete (size_t bytes_transferred,
00426                          int success,
00427                          const void *completion_key,
00428                          u_long error);
00429 
00430   /// Destructor.
00431   virtual ~ACE_POSIX_Asynch_Read_File_Result (void);
00432 };
00433 
00434 /**
00435  * @class ACE_POSIX_Asynch_Read_File
00436  *
00437  * @brief This class is a factory for starting off asynchronous reads
00438  *     on a file. This class implements <ACE_Asynch_Read_File> for
00439  *     all POSIX implementations of Proactor.
00440  *
00441  *     Once <open> is called, multiple asynchronous <read>s can
00442  *     started using this class.  A <ACE_Asynch_Read_File::Result>
00443  *     will be passed back to the @c handler when the asynchronous
00444  *     reads completes through the <ACE_Handler::handle_read_file>
00445  *     callback.
00446  *
00447  *     This class differs slightly from <ACE_Asynch_Read_Stream> as it
00448  *     allows the user to specify an offset for the read.
00449  */
00450 class ACE_Export ACE_POSIX_Asynch_Read_File : public virtual ACE_Asynch_Read_File_Impl,
00451                                               public ACE_POSIX_Asynch_Read_Stream
00452 {
00453 
00454 public:
00455   /// Constructor.
00456   ACE_POSIX_Asynch_Read_File (ACE_POSIX_Proactor *posix_proactor);
00457 
00458   /**
00459    * This starts off an asynchronous read.  Upto @a bytes_to_read will
00460    * be read and stored in the @a message_block.  The read will start
00461    * at @a offset from the beginning of the file.
00462    */
00463   int read (ACE_Message_Block &message_block,
00464             size_t bytes_to_read,
00465             u_long offset,
00466             u_long offset_high,
00467             const void *act,
00468             int priority,
00469             int signal_number = 0);
00470 
00471   /// Destructor.
00472   virtual ~ACE_POSIX_Asynch_Read_File (void);
00473 
00474 private:
00475   /**
00476    * This belongs to ACE_POSIX_Asynch_Read_Stream. We have
00477    * defined this here to avoid compiler warnings and forward the
00478    * method to <ACE_POSIX_Asynch_Read_Stream::read>.
00479    */
00480   int read (ACE_Message_Block &message_block,
00481             size_t bytes_to_read,
00482             const void *act,
00483             int priority,
00484             int signal_number = 0);
00485 };
00486 
00487 
00488 /**
00489  * @class ACE_POSIX_Asynch_Write_File_Result
00490  *
00491  * @brief This class provides implementation for
00492  *     <ACE_Asynch_Write_File_Result> for POSIX platforms.
00493  *
00494  *     This class has all the information necessary for the
00495  *     @c handler to uniquiely identify the completion of the
00496  *     asynchronous write.
00497  *
00498  *     This class differs slightly from
00499  *     <ACE_Asynch_Write_Stream::Result> as it calls back
00500  *     <ACE_Handler::handle_write_file> on the @c handler instead of
00501  *     <ACE_Handler::handle_write_stream>.  No additional state is
00502  *     required by this class as <ACE_Asynch_Result> can store the
00503  *     @a offset.
00504  */
00505 class ACE_Export ACE_POSIX_Asynch_Write_File_Result : public virtual ACE_Asynch_Write_File_Result_Impl,
00506                                                       public ACE_POSIX_Asynch_Write_Stream_Result
00507 {
00508   /// Factory classes will have special permissions.
00509   friend class ACE_POSIX_Asynch_Write_File;
00510 
00511   /// The Proactor constructs the Result class for faking results.
00512   friend class ACE_POSIX_Proactor;
00513 
00514 protected:
00515   /// Constructor is protected since creation is limited to
00516   /// ACE_Asynch_Write_File factory.
00517   ACE_POSIX_Asynch_Write_File_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00518                                       ACE_HANDLE handle,
00519                                       ACE_Message_Block &message_block,
00520                                       size_t bytes_to_write,
00521                                       const void* act,
00522                                       u_long offset,
00523                                       u_long offset_high,
00524                                       ACE_HANDLE event,
00525                                       int priority,
00526                                       int signal_number);
00527 
00528   /// ACE_Proactor will call this method when the write completes.
00529   virtual void complete (size_t bytes_transferred,
00530                          int success,
00531                          const void *completion_key,
00532                          u_long error);
00533 
00534   /// Destructor.
00535   virtual ~ACE_POSIX_Asynch_Write_File_Result (void);
00536 };
00537 
00538 /**
00539  * @class ACE_POSIX_Asynch_Write_File
00540  *
00541  *     This class provides concrete implementation for
00542  *     <ACE_Asynch_Write_File> for POSIX platforms where the
00543  *     completion strategy for Proactor is based on AIOCB (AIO
00544  *     Control Blocks).
00545  *
00546  */
00547 class ACE_Export ACE_POSIX_Asynch_Write_File : public virtual ACE_Asynch_Write_File_Impl,
00548                                                public ACE_POSIX_Asynch_Write_Stream
00549 {
00550 public:
00551   /// Constructor.
00552   ACE_POSIX_Asynch_Write_File (ACE_POSIX_Proactor *posix_proactor);
00553 
00554   /**
00555    * This starts off an asynchronous write.  Upto @a bytes_to_write
00556    * will be written and stored in the @a message_block.  The write will
00557    * start at @a offset from the beginning of the file.
00558    */
00559   int write (ACE_Message_Block &message_block,
00560              size_t bytes_to_write,
00561              u_long offset,
00562              u_long offset_high,
00563              const void *act,
00564              int priority,
00565              int signal_number = 0);
00566 
00567   /// Destructor.
00568   virtual ~ACE_POSIX_Asynch_Write_File (void);
00569 
00570 private:
00571   /**
00572    * This <write> belongs to ACE_POSIX_Asynch_Write_Stream. We
00573    * have put this here to avoid compiler warnings. We forward this
00574    * method call to the <ACE_POSIX_Asynch_Write_Stream::write>
00575    * one.
00576    */
00577   int write (ACE_Message_Block &message_block,
00578              size_t bytes_to_write,
00579              const void *act,
00580              int priority,
00581              int signal_number = 0);
00582 };
00583 
00584 /**
00585  * @class ACE_POSIX_Asynch_Accept_Result
00586  *
00587  * @brief This is that class which will be passed back to the
00588  *     handler when the asynchronous accept completes.
00589  *
00590  *
00591  *     This class has all the information necessary for the
00592  *     handler to uniquiely identify the completion of the
00593  *     asynchronous accept.
00594  */
00595 class ACE_Export ACE_POSIX_Asynch_Accept_Result : public virtual ACE_Asynch_Accept_Result_Impl,
00596                                                   public ACE_POSIX_Asynch_Result
00597 {
00598   /// Factory classes will have special permissions.
00599   friend class ACE_POSIX_Asynch_Accept;
00600 
00601   /// The Proactor constructs the Result class for faking results.
00602   friend class ACE_POSIX_Proactor;
00603 
00604 public:
00605   /// The number of bytes which were requested at the start of the
00606   /// asynchronous accept.
00607   size_t bytes_to_read (void) const;
00608 
00609   /// Message block which contains the read data.
00610   ACE_Message_Block &message_block (void) const;
00611 
00612   /// I/O handle used for accepting new connections.
00613   ACE_HANDLE listen_handle (void) const;
00614 
00615   /// I/O handle for the new connection.
00616   ACE_HANDLE accept_handle (void) const;
00617 
00618 protected:
00619   /// Constructor is protected since creation is limited to
00620   /// ACE_Asynch_Accept factory.
00621   ACE_POSIX_Asynch_Accept_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00622                                   ACE_HANDLE listen_handle,
00623                                   ACE_HANDLE accept_handle,
00624                                   ACE_Message_Block &message_block,
00625                                   size_t bytes_to_read,
00626                                   const void* act,
00627                                   ACE_HANDLE event,
00628                                   int priority,
00629                                   int signal_number);
00630 
00631   /// ACE_Proactor will call this method when the accept completes.
00632   virtual void complete (size_t bytes_transferred,
00633                          int success,
00634                          const void *completion_key,
00635                          u_long error);
00636 
00637   /// Destructor.
00638   virtual ~ACE_POSIX_Asynch_Accept_Result (void);
00639 
00640   // aiocb::aio_nbytes
00641   // Bytes requested when the asynchronous read was initiated.
00642   // Actually, on POSIX implementation, we dont read any intial data.
00643 
00644   /// Message block for reading the data into.
00645   ACE_Message_Block &message_block_;
00646 
00647   /// I/O handle used for accepting new connections.
00648   ACE_HANDLE listen_handle_;
00649 
00650   // aiocb::aio_filedes
00651   // I/O handle for the new connection.
00652 };
00653 
00654 
00655 /**
00656  * @class ACE_POSIX_Asynch_Accept
00657  *
00658  * @brief For the POSIX implementation this class is common for all Proactors
00659  * (AIOCB/SIG/SUN)
00660  */
00661 class ACE_Export ACE_POSIX_Asynch_Accept :
00662   public virtual ACE_Asynch_Accept_Impl,
00663   public ACE_POSIX_Asynch_Operation,
00664   public ACE_Event_Handler
00665 {
00666 public:
00667 
00668   /// Constructor.
00669   ACE_POSIX_Asynch_Accept (ACE_POSIX_Proactor * posix_proactor);
00670 
00671   /// Destructor.
00672   virtual ~ACE_POSIX_Asynch_Accept (void);
00673 
00674  /**
00675    * This <open> belongs to ACE_POSIX_Asynch_Operation. We forward
00676    * this call to that method. We have put this here to avoid the
00677    * compiler warnings.
00678    */
00679   int open (const ACE_Handler::Proxy_Ptr &handler_proxy,
00680             ACE_HANDLE handle,
00681             const void *completion_key,
00682             ACE_Proactor *proactor = 0);
00683 
00684   /**
00685    * This starts off an asynchronous accept.  The asynchronous accept
00686    * call also allows any initial data to be returned to the
00687    * @c handler.  Upto @a bytes_to_read will be read and stored in the
00688    * @a message_block.  The <accept_handle> will be used for the
00689    * <accept> call.  If (<accept_handle> == INVALID_HANDLE), a new
00690    * handle will be created.
00691    *
00692    * @a message_block must be specified. This is because the address of
00693    * the new connection is placed at the end of this buffer.
00694    */
00695   int accept (ACE_Message_Block &message_block,
00696               size_t bytes_to_read,
00697               ACE_HANDLE accept_handle,
00698               const void *act,
00699               int priority,
00700               int signal_number = 0,
00701               int addr_family = AF_INET);
00702 
00703   /**
00704    *  Cancel all pending pseudo-asynchronus requests
00705    *  Behavior as usual AIO request
00706    */
00707   int cancel (void);
00708 
00709   /**
00710    *  Close performs cancellation of all pending requests
00711    *  and closure the listen handle
00712    */
00713   int close ();
00714 
00715   /// virtual from ACE_Event_Handler
00716   ACE_HANDLE get_handle (void) const;
00717 
00718   /// virtual from ACE_Event_Handler
00719   void set_handle (ACE_HANDLE handle);
00720 
00721   /// virtual from ACE_Event_Handler
00722   /// Called when accept event comes up on <listen_handle>
00723   int handle_input (ACE_HANDLE handle);
00724 
00725   /// virtual from ACE_Event_Handler
00726   int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask);
00727 
00728 private:
00729   /// flg_notify points whether or not we should send notification about
00730   /// canceled accepts
00731   ///  Parameter flg_notify can be
00732   ///    0  - don't send notifications about canceled accepts
00733   ///    1  - notify user about canceled accepts
00734   ///         according POSIX standards we should receive notifications
00735   ///         on canceled AIO requests
00736   int cancel_uncompleted (int flg_notify);
00737 
00738   /// true  - Accept is registered in ACE_Asynch_Pseudo_Task
00739   /// false - Accept is deregisted in ACE_Asynch_Pseudo_Task
00740   bool flg_open_ ;
00741 
00742   /// Queue of Result pointers that correspond to all the pending
00743   /// accept operations.
00744   ACE_Unbounded_Queue<ACE_POSIX_Asynch_Accept_Result*> result_queue_;
00745 
00746   /// The lock to protect the result queue which is shared. The queue
00747   /// is updated by main thread in the register function call and
00748   /// through the auxillary thread in the deregister fun. So let us
00749   /// mutex it.
00750   ACE_SYNCH_MUTEX lock_;
00751 };
00752 
00753 /**
00754  * @class ACE_POSIX_Asynch_Connect_Result
00755  *
00756  * @brief This is that class which will be passed back to the
00757  *     completion handler when the asynchronous connect completes.
00758  *
00759  *     This class has all the information necessary for a
00760  *     completion handler to uniquely identify the completion of the
00761  *     asynchronous connect.
00762  */
00763 class ACE_Export ACE_POSIX_Asynch_Connect_Result : public virtual ACE_Asynch_Connect_Result_Impl,
00764                                                   public ACE_POSIX_Asynch_Result
00765 {
00766   /// Factory classes will have special permissions.
00767   friend class ACE_POSIX_Asynch_Connect;
00768 
00769   /// The Proactor constructs the Result class for faking results.
00770   friend class ACE_POSIX_Proactor;
00771 
00772 public:
00773 
00774   /// I/O handle for the  connection.
00775   ACE_HANDLE connect_handle (void) const;
00776 
00777 protected:
00778   /// Constructor is protected since creation is limited to
00779   /// ACE_Asynch_Connect factory.
00780   ACE_POSIX_Asynch_Connect_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00781                                    ACE_HANDLE  connect_handle,
00782                                    const void* act,
00783                                    ACE_HANDLE  event,
00784                                    int priority,
00785                                    int signal_number);
00786 
00787   /// ACE_Proactor will call this method when the accept completes.
00788   virtual void complete (size_t bytes_transferred,
00789                          int success,
00790                          const void *completion_key,
00791                          u_long error);
00792 
00793   /// Destructor.
00794   virtual ~ACE_POSIX_Asynch_Connect_Result (void);
00795 
00796   // aiocb::aio_filedes
00797   // I/O handle for the new connection.
00798   void connect_handle (ACE_HANDLE handle);
00799 };
00800 
00801 
00802 /**
00803  * @class ACE_POSIX_Asynch_Connect
00804  *
00805  */
00806 class ACE_Export ACE_POSIX_Asynch_Connect :
00807   public virtual ACE_Asynch_Connect_Impl,
00808   public ACE_POSIX_Asynch_Operation,
00809   public ACE_Event_Handler
00810 {
00811 public:
00812 
00813   /// Constructor.
00814   ACE_POSIX_Asynch_Connect (ACE_POSIX_Proactor * posix_proactor);
00815 
00816   /// Destructor.
00817   virtual ~ACE_POSIX_Asynch_Connect (void);
00818 
00819  /**
00820    * This belongs to ACE_POSIX_Asynch_Operation. We forward
00821    * this call to that method. We have put this here to avoid the
00822    * compiler warnings.
00823    */
00824   int open (const ACE_Handler::Proxy_Ptr &handler_proxy,
00825             ACE_HANDLE handle,
00826             const void *completion_key,
00827             ACE_Proactor *proactor = 0);
00828 
00829   /**
00830    * This starts off an asynchronous connect.
00831    *
00832    * @arg connect_handle   will be used for the connect call.  If
00833    *                       ACE_INVALID_HANDLE is specified, a new
00834    *                       handle will be created.
00835    */
00836   int connect (ACE_HANDLE connect_handle,
00837                const ACE_Addr &remote_sap,
00838                const ACE_Addr &local_sap,
00839                int reuse_addr,
00840                const void *act,
00841                int priority,
00842                int signal_number = 0);
00843 
00844   /**
00845    *  Cancel all pending pseudo-asynchronus requests
00846    *  Behavior as usual AIO request
00847    */
00848   int cancel (void);
00849 
00850   /**
00851    *  Close performs cancellation of all pending requests.
00852    */
00853   int close (void);
00854 
00855   /// virtual from ACE_Event_Handler
00856   ACE_HANDLE get_handle (void) const;
00857 
00858   /// virtual from ACE_Event_Handler
00859   void set_handle (ACE_HANDLE handle);
00860 
00861   /// virtual from ACE_Event_Handler
00862   /// The default action on handle_input() and handle_exception is to
00863   /// return -1. Since that's what we want to do, just reuse them.
00864   /// handle_output(), however, is where successful connects are reported.
00865   int handle_output (ACE_HANDLE handle);
00866 
00867   /// virtual from ACE_Event_Handler
00868   int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) ;
00869 
00870 private:
00871   int connect_i (ACE_POSIX_Asynch_Connect_Result *result,
00872                  const ACE_Addr & remote_sap,
00873                  const ACE_Addr & local_sap,
00874                  int reuse_addr);
00875 
00876   int post_result (ACE_POSIX_Asynch_Connect_Result *result, bool flg_post);
00877 
00878   /// Cancel uncompleted connect operations.
00879   /**
00880    *  @arg flg_notify  Indicates whether or not we should send notification
00881    *                   about canceled accepts.  If this is false, don't send
00882    *                   notifications about canceled connects.  If true, notify
00883    *                   user about canceled connects according POSIX
00884    *                   standards we should receive notifications on canceled
00885    *                   AIO requests.
00886    */
00887   int cancel_uncompleted (bool flg_notify, ACE_Handle_Set &set);
00888 
00889   bool flg_open_ ;
00890   /// true  - Connect is registered in ACE_Asynch_Pseudo_Task
00891   /// false - Aceept is deregisted in ACE_Asynch_Pseudo_Task
00892 
00893   typedef ACE_Map_Manager<ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *, ACE_SYNCH_NULL_MUTEX>
00894           MAP_MANAGER;
00895 
00896   /// @deprecated (Two) Deprecated typedefs.  Use the map traits instead.
00897   typedef MAP_MANAGER::ITERATOR MAP_ITERATOR;
00898   typedef MAP_MANAGER::ENTRY MAP_ENTRY;
00899 
00900   /// Map of Result pointers that correspond to all the pending connects.
00901   MAP_MANAGER result_map_;
00902 
00903   /// The lock to protect the result map which is shared. The queue
00904   /// is updated by main thread in the register function call and
00905   /// through the auxillary thread  in the asynch pseudo task.
00906   ACE_SYNCH_MUTEX lock_;
00907 };
00908 
00909 
00910 /**
00911  * @class ACE_POSIX_Asynch_Transmit_File_Result
00912  *
00913  * @brief This is that class which will be passed back to the
00914  *     <handler> when the asynchronous transmit file completes.
00915  *
00916  *     This class has all the information necessary for the
00917  *     <handler> to uniquiely identify the completion of the
00918  *     asynchronous transmit file.
00919  */
00920 class ACE_Export ACE_POSIX_Asynch_Transmit_File_Result : public virtual ACE_Asynch_Transmit_File_Result_Impl,
00921                                                          public ACE_POSIX_Asynch_Result
00922 {
00923   /// Factory classes will have special permissions.
00924   friend class ACE_POSIX_Asynch_Transmit_File;
00925 
00926   /// Handlers do all the job.
00927   friend class ACE_POSIX_Asynch_Transmit_Handler;
00928 
00929   /// The Proactor constructs the Result class for faking results.
00930   friend class ACE_POSIX_Proactor;
00931 
00932 public:
00933   /// Socket used for transmitting the file.
00934   ACE_HANDLE socket (void) const;
00935 
00936   /// File from which the data is read.
00937   ACE_HANDLE file (void) const;
00938 
00939   /// Header and trailer data associated with this transmit file.
00940   ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer (void) const;
00941 
00942   /// The number of bytes which were requested at the start of the
00943   /// asynchronous transmit file.
00944   size_t bytes_to_write (void) const;
00945 
00946   /// Number of bytes per send requested at the start of the transmit
00947   /// file.
00948   size_t bytes_per_send (void) const;
00949 
00950   /// Flags which were passed into transmit file.
00951   u_long flags (void) const;
00952 
00953 protected:
00954   ACE_POSIX_Asynch_Transmit_File_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
00955                                          ACE_HANDLE socket,
00956                                          ACE_HANDLE file,
00957                                          ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
00958                                          size_t bytes_to_write,
00959                                          u_long offset,
00960                                          u_long offset_high,
00961                                          size_t bytes_per_send,
00962                                          u_long flags,
00963                                          const void *act,
00964                                          ACE_HANDLE event,
00965                                          int priority,
00966                                          int signal_number);
00967   // Constructor is protected since creation is limited to
00968   // ACE_Asynch_Transmit_File factory.
00969 
00970   /// ACE_Proactor will call this method when the write completes.
00971   virtual void complete (size_t bytes_transferred,
00972                          int success,
00973                          const void *completion_key,
00974                          u_long error);
00975 
00976   /// Destructor.
00977   virtual ~ACE_POSIX_Asynch_Transmit_File_Result (void);
00978 
00979   /// Network I/O handle.
00980   ACE_HANDLE socket_;
00981 
00982   // aiocb::aio_filedes
00983   // File I/O handle.
00984 
00985   /// Header and trailer data associated with this transmit file.
00986   ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer_;
00987 
00988   // aiocb::aio_nbytes
00989   // The number of bytes which were requested at the start of the
00990   // asynchronous transmit file.
00991 
00992   /// Number of bytes per send requested at the start of the transmit
00993   /// file.
00994   size_t bytes_per_send_;
00995 
00996   /// Flags which were passed into transmit file.
00997   u_long flags_;
00998 };
00999 
01000 /**
01001  * @class ACE_POSIX_Asynch_Transmit_File
01002  *
01003  * @brief Implementation for transmit_file will make use of
01004  *     POSIX_Asynch_Transmit_Handler.
01005  */
01006 class ACE_Export ACE_POSIX_Asynch_Transmit_File : public virtual ACE_Asynch_Transmit_File_Impl,
01007                                                   public ACE_POSIX_Asynch_Operation
01008 {
01009 public:
01010   /// Constructor.
01011   ACE_POSIX_Asynch_Transmit_File (ACE_POSIX_Proactor *posix_proactor);
01012 
01013   /**
01014    * This starts off an asynchronous transmit file. The <file> is a
01015    * handle to an open file.  <header_and_trailer> is a pointer to a
01016    * data structure that contains pointers to data to send before and
01017    * after the file data is sent.  Set this parameter to 0 if you only
01018    * want to transmit the file data.  Upto @a bytes_to_write will be
01019    * written to the <socket>.  If you want to send the entire file,
01020    * let @a bytes_to_write = 0.  @a bytes_per_send is the size of each
01021    * block of data sent per send operation. Please read the POSIX
01022    * documentation on what the flags should be.
01023    */
01024   int transmit_file (ACE_HANDLE file,
01025                      ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
01026                      size_t bytes_to_write,
01027                      u_long offset,
01028                      u_long offset_high,
01029                      size_t bytes_per_send,
01030                      u_long flags,
01031                      const void *act,
01032                      int priority,
01033                      int signal_number = 0);
01034 
01035   /// Destructor.
01036   virtual ~ACE_POSIX_Asynch_Transmit_File (void);
01037 };
01038 
01039 
01040 /**
01041  * @class ACE_POSIX_Asynch_Read_Dgram
01042  *
01043  * @brief This class is a factory for starting off asynchronous reads
01044  *     on a UDP socket.
01045  *
01046  *     Once <open> is called, multiple asynchronous <read>s can be
01047  *     started using this class.  An ACE_Asynch_Read_Dgram::Result
01048  *     will be passed back to the <handler> when the asynchronous
01049  *     reads completes through the <ACE_Handler::handle_read_stream>
01050  *     callback.
01051  *
01052  */
01053 class ACE_Export ACE_POSIX_Asynch_Read_Dgram : public virtual ACE_Asynch_Read_Dgram_Impl,
01054                                                public ACE_POSIX_Asynch_Operation
01055 {
01056 public:
01057   /// Constructor.
01058   ACE_POSIX_Asynch_Read_Dgram (ACE_POSIX_Proactor *posix_proactor);
01059   virtual ~ACE_POSIX_Asynch_Read_Dgram (void);
01060 
01061   /** This method queues an asynchronous read.  Up to
01062    * @a message_block->total_size() bytes will be read and stored in the
01063    * @a message_block beginning at its write pointer. The @a message_block
01064    * write pointer will be updated to reflect any added bytes if the read
01065    * operation is successful completed.
01066    * Priority of the operation is specified by @a priority. On POSIX4-Unix,
01067    * this is supported. Works like <nice> in Unix. Negative values are not
01068    * allowed. 0 means priority of the operation same as the process
01069    * priority. 1 means priority of the operation is one less than
01070    * process.  @a signal_number argument is a no-op on non-POSIX4 systems.
01071    *
01072    * @note Unlike the Windows version of this facility, no indication of
01073    * immediate success can be returned, and @a number_of_bytes_read is
01074    * never used.
01075    *
01076    * @arg flags Not used.
01077    * @arg protocol_family Not used.
01078    * @retval 0  The IO will complete asynchronously.
01079    * @retval -1 There was an error; see @c errno to get the error code.
01080    *
01081    */
01082   virtual ssize_t recv (ACE_Message_Block *message_block,
01083                         size_t &number_of_bytes_recvd,
01084                         int flags,
01085                         int protocol_family,
01086                         const void *act,
01087                         int priority,
01088                         int signal_number);
01089 
01090 protected:
01091   /// Do-nothing constructor.
01092   ACE_POSIX_Asynch_Read_Dgram (void);
01093 };
01094 
01095 /**
01096  * @class ACE_POSIX__Asynch_Write_Dgram_Result
01097  *
01098  * @brief This is class provides concrete implementation for
01099  *        ACE_Asynch_Write_Dgram::Result class.
01100  */
01101 class ACE_Export ACE_POSIX_Asynch_Write_Dgram_Result : public virtual ACE_Asynch_Write_Dgram_Result_Impl,
01102                                                        public ACE_POSIX_Asynch_Result
01103 {
01104   /// Factory classes will have special permissions.
01105   friend class ACE_POSIX_Asynch_Write_Dgram;
01106 
01107   /// Proactor class has special permission.
01108   friend class ACE_POSIX_Proactor;
01109 
01110 public:
01111   /// The number of bytes which were requested at the start of the
01112   /// asynchronous write.
01113   size_t bytes_to_write (void) const;
01114 
01115   /// Message block which contains the sent data
01116   ACE_Message_Block *message_block (void) const;
01117 
01118   /// The flags using in the write
01119   int flags (void) const;
01120 
01121   /// I/O handle used for writing.
01122   ACE_HANDLE handle (void) const;
01123 
01124 protected:
01125   /// Constructor is protected since creation is limited to
01126   /// ACE_Asynch_Write_Stream factory.
01127   ACE_POSIX_Asynch_Write_Dgram_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
01128                                        ACE_HANDLE handle,
01129                                        ACE_Message_Block *message_block,
01130                                        size_t bytes_to_write,
01131                                        int flags,
01132                                        const void* act,
01133                                        ACE_HANDLE event,
01134                                        int priority,
01135                                        int signal_number);
01136 
01137   /// ACE_Proactor will call this method when the write completes.
01138   virtual void complete (size_t bytes_transferred,
01139                          int success,
01140                          const void *completion_key,
01141                          u_long error);
01142 
01143   /// Destructor.
01144   virtual ~ACE_POSIX_Asynch_Write_Dgram_Result (void);
01145 
01146   /// The number of bytes which were requested at the start of the
01147   /// asynchronous write.
01148   size_t bytes_to_write_;
01149 
01150   /// Message block used for the send.
01151   ACE_Message_Block *message_block_;
01152 
01153   /// The flags using in the write
01154   int flags_;
01155 
01156   /// I/O handle used for writing.
01157   ACE_HANDLE handle_;
01158 
01159   };
01160 
01161 /**
01162  * @class ACE_POSIX_Asynch_Write_Dgram
01163  *
01164  * @brief This class is a factory for starting off asynchronous writes
01165  *    on a UDP socket. The UDP socket must be "connected", as there is
01166  *    no facility for specifying the destination address on each send
01167  *    operation.
01168  *
01169  *     Once @c open() is called, multiple asynchronous writes can
01170  *     started using this class.  A ACE_Asynch_Write_Stream::Result
01171  *     will be passed back to the associated completion handler when the
01172  *     asynchronous write completes through the
01173  *     ACE_Handler::handle_write_stream() callback.
01174  */
01175 class ACE_Export ACE_POSIX_Asynch_Write_Dgram : public virtual ACE_Asynch_Write_Dgram_Impl,
01176                                                 public ACE_POSIX_Asynch_Operation
01177 {
01178 public:
01179   /// Constructor.
01180   ACE_POSIX_Asynch_Write_Dgram (ACE_POSIX_Proactor *posix_proactor);
01181 
01182   /// Destructor
01183   virtual ~ACE_POSIX_Asynch_Write_Dgram (void);
01184 
01185   /** This method queues an asynchronous send.  Up to
01186    * @a message_block->total_length bytes will be sent, beginning at the
01187    * read pointer. The @a message_block read pointer will be updated to
01188    * reflect the sent bytes if the send operation is successful completed.
01189    *
01190    * Priority of the operation is specified by @a priority. On POSIX,
01191    * this is supported. Works like @c nice in Unix. Negative values are not
01192    * allowed. 0 means priority of the operation same as the process
01193    * priority. 1 means priority of the operation is one less than
01194    * process, etc.
01195    * @a signal_number is a no-op on non-POSIX4 systems.
01196    *
01197    * @note Unlike the Windows version of this facility, no indication of
01198    * immediate success can be returned, and @a number_of_bytes_sent is
01199    * never used.
01200    *
01201    * @arg flags Not used.
01202    * @arg addr Not used.
01203    * @retval 0  The IO will complete asynchronously.
01204    * @retval -1 There was an error; see @c errno to get the error code.
01205    */
01206   virtual ssize_t send (ACE_Message_Block *message_block,
01207                         size_t &number_of_bytes_sent,
01208                         int flags,
01209                         const ACE_Addr &addr,
01210                         const void *act,
01211                         int priority,
01212                         int signal_number);
01213 
01214 protected:
01215   /// Do-nothing constructor.
01216   ACE_POSIX_Asynch_Write_Dgram (void);
01217 };
01218 
01219 
01220 /*****************************************************/
01221 
01222 /**
01223  * @class ACE_POSIX_Asynch_Read_Dgram_Result
01224  *
01225  * @brief This is class provides concrete implementation for
01226  *        ACE_Asynch_Read_Dgram::Result class.
01227  */
01228 class ACE_Export ACE_POSIX_Asynch_Read_Dgram_Result : public virtual ACE_Asynch_Read_Dgram_Result_Impl,
01229                                                       public virtual ACE_POSIX_Asynch_Result
01230 {
01231 
01232   /// Factory classes will have special permissions.
01233   friend class ACE_POSIX_Asynch_Read_Dgram;
01234 
01235   /// Proactor class has special permission.
01236   friend class ACE_POSIX_Proactor;
01237 
01238 public:
01239   /// The number of bytes which were requested at the start of the
01240   /// asynchronous read.
01241   size_t bytes_to_read (void) const;
01242 
01243   /// Message block which contains the read data
01244   ACE_Message_Block *message_block (void) const;
01245 
01246   /// The address of where the packet came from
01247   int remote_address (ACE_Addr& addr) const;
01248 
01249   sockaddr *saddr (void) const;
01250 
01251   /// The flags used in the read
01252   int flags (void) const;
01253 
01254   /// I/O handle used for reading.
01255   ACE_HANDLE handle (void) const;
01256 
01257 protected:
01258   /// Constructor is protected since creation is limited to
01259   /// ACE_Asynch_Read_Dgram factory.
01260   ACE_POSIX_Asynch_Read_Dgram_Result (const ACE_Handler::Proxy_Ptr &handler_proxy,
01261                                       ACE_HANDLE handle,
01262                                       ACE_Message_Block *message_block,
01263                                       size_t bytes_to_read,
01264                                       int flags,
01265                                       int protocol_family,
01266                                       const void* act,
01267                                       ACE_HANDLE event,
01268                                       int priority,
01269                                       int signal_number = 0);
01270 
01271   /// Proactor will call this method when the read completes.
01272   virtual void complete (size_t bytes_transferred,
01273                          int success,
01274                          const void *completion_key,
01275                          u_long error);
01276 
01277   /// Destructor.
01278   virtual ~ACE_POSIX_Asynch_Read_Dgram_Result (void);
01279 
01280   /// Bytes requested when the asynchronous read was initiated.
01281   size_t bytes_to_read_;
01282 
01283   /// Message block for reading the data into.
01284   ACE_Message_Block *message_block_;
01285 
01286   /// The address of where the packet came from
01287   ACE_Addr *remote_address_;
01288 
01289   int addr_len_;
01290 
01291   /// The flags used in the read
01292   int flags_;
01293 
01294   /// I/O handle used for reading.
01295   ACE_HANDLE handle_;
01296 
01297 };
01298 
01299 ACE_END_VERSIONED_NAMESPACE_DECL
01300 
01301 #endif /* ACE_HAS_AIO_CALLS */
01302 #endif /* ACE_POSIX_ASYNCH_IO_H */

Generated on Tue Feb 2 17:18:41 2010 for ACE by  doxygen 1.4.7