3 #include "ace/OS_NS_unistd.h"
5 #if defined (ACE_HAS_ALLOC_HOOKS)
6 # include "ace/Malloc_Base.h"
7 #endif /* ACE_HAS_ALLOC_HOOKS */
9 #if !defined (__ACE_INLINE__)
10 #include "ace/SPIPE.inl"
11 #endif /* __ACE_INLINE__ */
13 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
15 ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE
)
17 // This is the do-nothing constructor.
19 ACE_SPIPE::ACE_SPIPE ()
21 // ACE_TRACE ("ACE_SPIPE::ACE_SPIPE");
25 ACE_SPIPE::dump () const
27 #if defined (ACE_HAS_DUMP)
28 ACE_TRACE ("ACE_SPIPE::dump");
29 #endif /* ACE_HAS_DUMP */
32 // Close down a ACE_SPIPE.
35 ACE_SPIPE::get_local_addr (ACE_SPIPE_Addr
&local_sap
) const
37 ACE_TRACE ("ACE_SPIPE::get_local_addr");
38 local_sap
= this->local_addr_
;
42 // Close down the STREAM pipe without removing the rendezvous point.
47 ACE_TRACE ("ACE_SPIPE::close");
50 if (this->get_handle () != ACE_INVALID_HANDLE
)
52 result
= ACE_OS::close (this->get_handle ());
53 #if defined (ACE_HAS_STREAM_PIPES)
54 result
= (ACE_OS::close (duplex_pipe_handle_
) || result
);
55 #endif /* ACE_HAS_STREAM_PIPES */
56 this->set_handle (ACE_INVALID_HANDLE
);
61 // Close down the STREAM pipe and remove the rendezvous point from the
67 ACE_TRACE ("ACE_SPIPE::remove");
68 int result
= this->close ();
69 return ACE_OS::unlink (this->local_addr_
.get_path_name ()) == -1 || result
== -1 ? -1 : 0;
72 #if defined (ACE_HAS_STREAM_PIPES)
73 /// Temporary store of duplex pipe handle.
75 ACE_SPIPE::set_duplex_handle (ACE_HANDLE handle
)
77 ACE_TRACE ("ACE_SPIPE::set_duplex_handle");
78 this->duplex_pipe_handle_
= handle
;
80 #endif /* ACE_HAS_STREAM_PIPES */
82 ACE_END_VERSIONED_NAMESPACE_DECL