Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / LSOCK.h
blob294d0eb4930ad73d68ea061f5f0629217752d5c3
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file LSOCK.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
12 #ifndef ACE_LOCAL_SOCK_H
13 #define ACE_LOCAL_SOCK_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "ace/ACE_export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
25 #include "ace/SOCK.h"
27 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 /**
30 * @class ACE_LSOCK
32 * @brief Create a Local ACE_SOCK, which is used for passing file
33 * descriptors.
35 class ACE_Export ACE_LSOCK
37 public:
38 #if defined (ACE_HAS_MSG)
39 /// Send an open FD to another process.
40 ssize_t send_handle (const ACE_HANDLE handle) const;
42 /// Recv an open FD from another process.
43 ssize_t recv_handle (ACE_HANDLE &handles,
44 char *pbuf = 0,
45 ssize_t *len = 0) const;
46 #endif /* ACE_HAS_MSG */
48 /// Dump the state of an object.
49 void dump () const;
51 /// Declare the dynamic allocation hooks.
52 ACE_ALLOC_HOOK_DECLARE;
54 protected:
55 // = Ensure that ACE_LSOCK is an abstract base class
57 /// Default constructor.
58 ACE_LSOCK ();
60 /// Initialize based on @a handle.
61 ACE_LSOCK (ACE_HANDLE handle);
63 /// Get handle.
64 ACE_HANDLE get_handle () const;
66 /// Set handle.
67 void set_handle (ACE_HANDLE handle);
69 private:
70 /// An auxiliary handle used to avoid virtual base classes...
71 ACE_HANDLE aux_handle_;
74 ACE_END_VERSIONED_NAMESPACE_DECL
76 #if defined (__ACE_INLINE__)
77 #include "ace/LSOCK.inl"
78 #endif /* __ACE_INLINE__ */
80 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
81 #include /**/ "ace/post.h"
82 #endif /* ACE_LOCAL_SOCK_H */