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__ */
15 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
17 ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE
)
19 // This is the do-nothing constructor.
21 ACE_SPIPE::ACE_SPIPE (void)
23 // ACE_TRACE ("ACE_SPIPE::ACE_SPIPE");
27 ACE_SPIPE::dump (void) const
29 #if defined (ACE_HAS_DUMP)
30 ACE_TRACE ("ACE_SPIPE::dump");
31 #endif /* ACE_HAS_DUMP */
34 // Close down a ACE_SPIPE.
37 ACE_SPIPE::get_local_addr (ACE_SPIPE_Addr
&local_sap
) const
39 ACE_TRACE ("ACE_SPIPE::get_local_addr");
40 local_sap
= this->local_addr_
;
44 // Close down the STREAM pipe without removing the rendezvous point.
47 ACE_SPIPE::close (void)
49 ACE_TRACE ("ACE_SPIPE::close");
52 if (this->get_handle () != ACE_INVALID_HANDLE
)
54 result
= ACE_OS::close (this->get_handle ());
55 #if defined (ACE_HAS_STREAM_PIPES)
56 result
= (ACE_OS::close (duplex_pipe_handle_
) || result
);
57 #endif /* ACE_HAS_STREAM_PIPES */
58 this->set_handle (ACE_INVALID_HANDLE
);
63 // Close down the STREAM pipe and remove the rendezvous point from the
67 ACE_SPIPE::remove (void)
69 ACE_TRACE ("ACE_SPIPE::remove");
70 int result
= this->close ();
71 return ACE_OS::unlink (this->local_addr_
.get_path_name ()) == -1 || result
== -1 ? -1 : 0;
74 #if defined (ACE_HAS_STREAM_PIPES)
75 /// Temporary store of duplex pipe handle.
77 ACE_SPIPE::set_duplex_handle (ACE_HANDLE handle
)
79 ACE_TRACE ("ACE_SPIPE::set_duplex_handle");
80 this->duplex_pipe_handle_
= handle
;
82 #endif /* ACE_HAS_STREAM_PIPES */
84 ACE_END_VERSIONED_NAMESPACE_DECL