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

SPIPE.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    SPIPE.h
00006  *
00007  *  $Id: SPIPE.h,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_SPIPE_H
00015 #define ACE_SPIPE_H
00016 #include "ace/pre.h"
00017 
00018 #include "ace/IPC_SAP.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/SPIPE_Addr.h"
00025 
00026 /**
00027  * @class ACE_SPIPE
00028  *
00029  * @brief Defines the member functions for the base class of the
00030  * ACE_SPIPE abstraction.
00031  *
00032  * ACE_SPIPE was designed as a wrapper facade for STREAM pipes. On
00033  * Windows, however, ACE_SPIPE is a wrapper for Named Pipes. Therefore,
00034  * on Windows, it is better to use the ACE_Proactor or blocking operations
00035  * in lieu of using the ACE_Reactor.
00036  *
00037  * @sa ACE_SPIPE_Acceptor for additional notes on use with ACE_Reactor
00038  * on Windows.
00039  *
00040  * @warning Windows: Works only on Windows NT 4 and higher.
00041  * @warning Works on non-Windows platforms only when @c ACE_HAS_STREAM_PIPES
00042  * is defined.
00043  */
00044 class ACE_Export ACE_SPIPE : public ACE_IPC_SAP
00045 {
00046 public:
00047   /// Close down the SPIPE without removing the rendezvous point.
00048   /**
00049    * Closes the underlying pipe handle and sets this object's handle value
00050    * to @c ACE_INVALID_HANDLE.
00051    * @return 0 for success; -1 for failure. If a failure occurs, further
00052    * error information is available from ACE_OS::last_error().
00053    */
00054   int close (void);
00055 
00056   /// Close down the SPIPE and remove the rendezvous point from
00057   /// the file system.
00058   /**
00059    * @return 0 for success; -1 for failure. If a failure occurs, further
00060    * error information is available from ACE_OS::last_error().
00061    */
00062   int remove (void);
00063 
00064   /// Return the local address of this endpoint.
00065   /**
00066    * Returns the local address of the SPIPE's endpoint in @arg addr.
00067    * @return 0 for success; -1 for failure. If a failure occurs, further
00068    * error information is available from ACE_OS::last_error().
00069    */
00070   int get_local_addr (ACE_SPIPE_Addr &) const;
00071 
00072   /**
00073    * Disable signal @arg signum.
00074    * @note This reimplements the inherited method from
00075    * ACE_IPC_SAP. Since the signal actions do not make any sense on
00076    * Windows, this method intercepts the call and NOPs it. On non-Windows,
00077    * it is passed through to ACE_IPC_SAP::disable().
00078    */
00079   int disable (int signum) const ;
00080 
00081   /// Dump the state of an object.
00082   void dump (void) const;
00083 
00084   /// Declare the dynamic allocation hooks.
00085   ACE_ALLOC_HOOK_DECLARE;
00086 
00087 protected:
00088   /// Ensure that this class is an abstract base class
00089   ACE_SPIPE (void);
00090 
00091   /// Our local address.
00092   ACE_SPIPE_Addr local_addr_;
00093 };
00094 
00095 #if !defined (ACE_LACKS_INLINE_FUNCTIONS)
00096 #include "ace/SPIPE.i"
00097 #endif
00098 
00099 #include "ace/post.h"
00100 #endif /* ACE_SPIPE_H */

Generated on Mon Jun 16 11:21:21 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002