Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_SPIPE Class Reference

Defines the member functions for the base class of the ACE_SPIPE abstraction. More...

#include <SPIPE.h>

Inheritance diagram for ACE_SPIPE:

Inheritance graph
[legend]
Collaboration diagram for ACE_SPIPE:

Collaboration graph
[legend]
List of all members.

Public Methods

int close (void)
 Close down the SPIPE without removing the rendezvous point. More...

int remove (void)
 Close down the SPIPE and remove the rendezvous point from the file system. More...

int get_local_addr (ACE_SPIPE_Addr &) const
 Return the local address of this endpoint. More...

int disable (int signum) const
void dump (void) const
 Dump the state of an object. More...


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...


Protected Methods

 ACE_SPIPE (void)
 Ensure that this class is an abstract base class. More...


Protected Attributes

ACE_SPIPE_Addr local_addr_
 Our local address. More...


Detailed Description

Defines the member functions for the base class of the ACE_SPIPE abstraction.

ACE_SPIPE was designed as a wrapper facade for STREAM pipes. On Windows, however, ACE_SPIPE is a wrapper for Named Pipes. Therefore, on Windows, it is better to use the ACE_Proactor or blocking operations in lieu of using the ACE_Reactor.

See also:
ACE_SPIPE_Acceptor for additional notes on use with ACE_Reactor on Windows.
Warning:
Windows: Works only on Windows NT 4 and higher.
Works on non-Windows platforms only when ACE_HAS_STREAM_PIPES is defined.

Definition at line 44 of file SPIPE.h.


Constructor & Destructor Documentation

ACE_SPIPE::ACE_SPIPE void    [protected]
 

Ensure that this class is an abstract base class.

Definition at line 17 of file SPIPE.cpp.

00018 {
00019   // ACE_TRACE ("ACE_SPIPE::ACE_SPIPE");
00020 }


Member Function Documentation

int ACE_SPIPE::close void   
 

Close down the SPIPE without removing the rendezvous point.

Closes the underlying pipe handle and sets this object's handle value to ACE_INVALID_HANDLE.

Returns:
0 for success; -1 for failure. If a failure occurs, further error information is available from ACE_OS::last_error().

Reimplemented in ACE_SPIPE_Acceptor.

Definition at line 41 of file SPIPE.cpp.

References ACE_TRACE, ACE_OS::close, ACE_IPC_SAP::get_handle, and ACE_IPC_SAP::set_handle.

Referenced by ACE_UPIPE_Stream::close, ACE_SPIPE_Acceptor::close, and remove.

00042 {
00043   ACE_TRACE ("ACE_SPIPE::close");
00044   int result = 0;
00045 
00046   if (this->get_handle () != ACE_INVALID_HANDLE)
00047     {
00048       result = ACE_OS::close (this->get_handle ());
00049       this->set_handle (ACE_INVALID_HANDLE);
00050     }
00051   return result;
00052 }

ASYS_INLINE int ACE_SPIPE::disable int    signum const
 

Disable signal

  • signum.
Note:
This reimplements the inherited method from ACE_IPC_SAP. Since the signal actions do not make any sense on Windows, this method intercepts the call and NOPs it. On non-Windows, it is passed through to ACE_IPC_SAP::disable().

Reimplemented from ACE_IPC_SAP.

Definition at line 7 of file SPIPE.i.

References ACE_IPC_SAP::disable.

00008 {
00009 #if defined (ACE_WIN32)
00010   ACE_UNUSED_ARG (signum) ;
00011   return 0 ;
00012 #else  /* ACE_WIN32 */
00013   return ACE_IPC_SAP::disable (signum) ;
00014 #endif /* ACE_WIN32 */
00015 }

void ACE_SPIPE::dump void    const
 

Dump the state of an object.

Reimplemented from ACE_IPC_SAP.

Reimplemented in ACE_SPIPE_Acceptor.

Definition at line 23 of file SPIPE.cpp.

References ACE_TRACE.

00024 {
00025   ACE_TRACE ("ACE_SPIPE::dump");
00026 }

int ACE_SPIPE::get_local_addr ACE_SPIPE_Addr   const
 

Return the local address of this endpoint.

Returns the local address of the SPIPE's endpoint in

  • addr.
Returns:
0 for success; -1 for failure. If a failure occurs, further error information is available from ACE_OS::last_error().

Definition at line 31 of file SPIPE.cpp.

References ACE_TRACE, and local_addr_.

Referenced by ACE_UPIPE_Acceptor::accept.

00032 {
00033   ACE_TRACE ("ACE_SPIPE::get_local_addr");
00034   local_sap = this->local_addr_;
00035   return 0;
00036 }

int ACE_SPIPE::remove void   
 

Close down the SPIPE and remove the rendezvous point from the file system.

Returns:
0 for success; -1 for failure. If a failure occurs, further error information is available from ACE_OS::last_error().

Reimplemented in ACE_SPIPE_Acceptor.

Definition at line 58 of file SPIPE.cpp.

References ACE_TRACE, close, and ACE_OS::unlink.

00059 {
00060   ACE_TRACE ("ACE_SPIPE::remove");
00061   int result = this->close ();
00062   return ACE_OS::unlink (this->local_addr_.get_path_name ()) == -1 || result == -1 ? -1 : 0;
00063 }


Member Data Documentation

ACE_SPIPE::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Reimplemented from ACE_IPC_SAP.

Reimplemented in ACE_SPIPE_Acceptor.

Definition at line 85 of file SPIPE.h.

ACE_SPIPE_Addr ACE_SPIPE::local_addr_ [protected]
 

Our local address.

Definition at line 92 of file SPIPE.h.

Referenced by ACE_UPIPE_Acceptor::accept, ACE_SPIPE_Acceptor::accept, ACE_SPIPE_Acceptor::create_new_instance, get_local_addr, and ACE_SPIPE_Acceptor::open.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:56:28 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002