summaryrefslogtreecommitdiff
path: root/ace/DEV_Connector.cpp
blob: 70f605762a966d3d05e8b015138850ea7da15107 (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
// DEV_Connector.cpp
// $Id$

#include "ace/DEV_Connector.h"

#if defined (ACE_LACKS_INLINE_FUNCTIONS)
#include "ace/DEV_Connector.i"
#endif

ACE_RCSID(ace, DEV_Connector, "$Id$")

ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Connector)

void
ACE_DEV_Connector::dump (void) const
{
  ACE_TRACE ("ACE_DEV_Connector::dump");
}

ACE_DEV_Connector::ACE_DEV_Connector (void)
{
  ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector");
}

int
ACE_DEV_Connector::connect (ACE_DEV_IO &new_io, 
			    const ACE_DEV_Addr &remote_sap,
			    ACE_Time_Value *timeout,
			    const ACE_Addr &, 
			    int,
			    int flags,
			    int perms)
{
  ACE_TRACE ("ACE_DEV_Connector::connect");

  ACE_HANDLE handle = ACE::handle_timed_open (timeout, 
					      remote_sap.get_path_name (),
					      flags, perms);
  new_io.set_handle (handle);
  new_io.addr_ = remote_sap; // class copy.
  return handle == ACE_INVALID_HANDLE ? -1 : 0;
}