LSOCK.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    LSOCK.h
00006  *
00007  *  LSOCK.h,v 4.19 2005/11/26 03:13:13 ossama Exp
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_LOCAL_SOCK_H
00015 #define ACE_LOCAL_SOCK_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "ace/ACE_export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00026 
00027 #include "ace/SOCK.h"
00028 
00029 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 /**
00032  * @class ACE_LSOCK
00033  *
00034  * @brief Create a Local ACE_SOCK, which is used for passing file
00035  * descriptors.
00036  */
00037 class ACE_Export ACE_LSOCK
00038 {
00039 public:
00040 #if defined (ACE_HAS_MSG)
00041   /// Send an open FD to another process.
00042   ssize_t send_handle (const ACE_HANDLE handle) const;
00043 
00044   /// Recv an open FD from another process.
00045   ssize_t recv_handle (ACE_HANDLE &handles,
00046                        char *pbuf = 0,
00047                        ssize_t *len = 0) const;
00048 #endif /* ACE_HAS_MSG */
00049 
00050   /// Dump the state of an object.
00051   void dump (void) const;
00052 
00053   /// Declare the dynamic allocation hooks.
00054   ACE_ALLOC_HOOK_DECLARE;
00055 
00056 protected:
00057   // = Ensure that ACE_LSOCK is an abstract base class
00058 
00059   /// Default constructor.
00060   ACE_LSOCK (void);
00061 
00062   /// Initialize based on @a handle.
00063   ACE_LSOCK (ACE_HANDLE handle);
00064 
00065   /// Get handle.
00066   ACE_HANDLE get_handle (void) const;
00067 
00068   /// Set handle.
00069   void set_handle (ACE_HANDLE handle);
00070 
00071 private:
00072   /// An auxiliary handle used to avoid virtual base classes...
00073   ACE_HANDLE aux_handle_;
00074 };
00075 
00076 ACE_END_VERSIONED_NAMESPACE_DECL
00077 
00078 #if defined (__ACE_INLINE__)
00079 #include "ace/LSOCK.inl"
00080 #endif /* __ACE_INLINE__ */
00081 
00082 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
00083 #include /**/ "ace/post.h"
00084 #endif /* ACE_LOCAL_SOCK_H */

Generated on Thu Nov 9 09:41:53 2006 for ACE by doxygen 1.3.6