blob: ff52532a8e66fba917260cd959b66918789ffb3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// SPIPE.cpp
// $Id$
#define ACE_BUILD_DLL
#include "ace/SPIPE.h"
ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE)
// This is the do-nothing constructor.
ACE_SPIPE::ACE_SPIPE (void)
{
ACE_TRACE ("ACE_SPIPE::ACE_SPIPE");
}
void
ACE_SPIPE::dump (void) const
{
ACE_TRACE ("ACE_SPIPE::dump");
}
// Close down a ACE_SPIPE.
int
ACE_SPIPE::get_local_addr (ACE_SPIPE_Addr &local_sap) const
{
ACE_TRACE ("ACE_SPIPE::get_local_addr");
local_sap = this->local_addr_;
return 0;
}
// Close down the STREAM pipe without removing the rendezvous point.
int
ACE_SPIPE::close (void)
{
ACE_TRACE ("ACE_SPIPE::close");
int result = 0;
if (this->get_handle () != ACE_INVALID_HANDLE)
{
result = ACE_OS::close (this->get_handle ());
this->set_handle (ACE_INVALID_HANDLE);
}
return result;
}
// Close down the STREAM pipe and remove the rendezvous point from the
// file system.
int
ACE_SPIPE::remove (void)
{
ACE_TRACE ("ACE_SPIPE::remove");
int result = this->close ();
return ACE_OS::unlink (this->local_addr_.get_path_name ()) == -1 || result == -1 ? -1 : 0;
}
|