Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / ace / LSOCK.h
blob7cf7abc478c0dacca2489ff93f43354c6f92f16b
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file LSOCK.h
7 * $Id: LSOCK.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
11 //=============================================================================
14 #ifndef ACE_LOCAL_SOCK_H
15 #define ACE_LOCAL_SOCK_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/ACE_export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
27 #include "ace/SOCK.h"
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 /**
32 * @class ACE_LSOCK
34 * @brief Create a Local ACE_SOCK, which is used for passing file
35 * descriptors.
37 class ACE_Export ACE_LSOCK
39 public:
40 #if defined (ACE_HAS_MSG)
41 /// Send an open FD to another process.
42 ssize_t send_handle (const ACE_HANDLE handle) const;
44 /// Recv an open FD from another process.
45 ssize_t recv_handle (ACE_HANDLE &handles,
46 char *pbuf = 0,
47 ssize_t *len = 0) const;
48 #endif /* ACE_HAS_MSG */
50 /// Dump the state of an object.
51 void dump (void) const;
53 /// Declare the dynamic allocation hooks.
54 ACE_ALLOC_HOOK_DECLARE;
56 protected:
57 // = Ensure that ACE_LSOCK is an abstract base class
59 /// Default constructor.
60 ACE_LSOCK (void);
62 /// Initialize based on @a handle.
63 ACE_LSOCK (ACE_HANDLE handle);
65 /// Get handle.
66 ACE_HANDLE get_handle (void) const;
68 /// Set handle.
69 void set_handle (ACE_HANDLE handle);
71 private:
72 /// An auxiliary handle used to avoid virtual base classes...
73 ACE_HANDLE aux_handle_;
76 ACE_END_VERSIONED_NAMESPACE_DECL
78 #if defined (__ACE_INLINE__)
79 #include "ace/LSOCK.inl"
80 #endif /* __ACE_INLINE__ */
82 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
83 #include /**/ "ace/post.h"
84 #endif /* ACE_LOCAL_SOCK_H */