3 //=============================================================================
9 //=============================================================================
14 #include /**/ "ace/pre.h"
16 #include "ace/IPC_SAP.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/SPIPE_Addr.h"
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @brief Defines the member functions for the base class of the
30 * ACE_SPIPE abstraction.
32 * ACE_SPIPE was designed as a wrapper facade for STREAM pipes. On
33 * Windows, however, ACE_SPIPE is a wrapper for Named Pipes. Therefore,
34 * on Windows, it is better to use the ACE_Proactor or blocking operations
35 * in lieu of using the ACE_Reactor.
37 * @sa ACE_SPIPE_Acceptor for additional notes on use with ACE_Reactor
40 * @warning Windows: Works only on Windows NT 4 and higher.
41 * @warning Works on non-Windows platforms only when @c ACE_HAS_STREAM_PIPES
44 class ACE_Export ACE_SPIPE
: public ACE_IPC_SAP
47 /// Close down the SPIPE without removing the rendezvous point.
49 * Closes the underlying pipe handle and sets this object's handle value
50 * to @c ACE_INVALID_HANDLE.
51 * @return 0 for success; -1 for failure. If a failure occurs, further
52 * error information is available from ACE_OS::last_error().
56 /// Close down the SPIPE and remove the rendezvous point from
59 * @return 0 for success; -1 for failure. If a failure occurs, further
60 * error information is available from ACE_OS::last_error().
64 /// Return the local address of this endpoint.
66 * Returns the local address of the SPIPE's endpoint in @arg addr.
67 * @return 0 for success; -1 for failure. If a failure occurs, further
68 * error information is available from ACE_OS::last_error().
70 int get_local_addr (ACE_SPIPE_Addr
&) const;
73 * Disable signal @arg signum.
74 * @note This reimplements the inherited method from
75 * ACE_IPC_SAP. Since the signal actions do not make any sense on
76 * Windows, this method intercepts the call and NOPs it. On non-Windows,
77 * it is passed through to ACE_IPC_SAP::disable().
79 int disable (int signum
) const ;
81 /// Dump the state of an object.
84 #if defined (ACE_HAS_STREAM_PIPES)
85 /// Temporary store of duplex pipe handle.
86 void set_duplex_handle (ACE_HANDLE handle
);
87 #endif /* ACE_HAS_STREAM_PIPES */
89 /// Declare the dynamic allocation hooks.
90 ACE_ALLOC_HOOK_DECLARE
;
93 #if defined (ACE_HAS_STREAM_PIPES)
94 /// Duplex to the pipe I/O handle.
95 /// Stored here for latter cleaning.
96 ACE_HANDLE duplex_pipe_handle_
;
97 #endif /* ACE_HAS_STREAM_PIPES */
100 /// Ensure that this class is an abstract base class
103 /// Our local address.
104 ACE_SPIPE_Addr local_addr_
;
107 ACE_END_VERSIONED_NAMESPACE_DECL
109 #if defined (__ACE_INLINE__)
110 #include "ace/SPIPE.inl"
111 #endif /* __ACE_INLINE__ */
113 #include /**/ "ace/post.h"
114 #endif /* ACE_SPIPE_H */