1 #include "ace/DEV_Connector.h"
3 #include "ace/Handle_Ops.h"
4 #if defined (ACE_HAS_ALLOC_HOOKS)
5 # include "ace/Malloc_Base.h"
6 #endif /* ACE_HAS_ALLOC_HOOKS */
8 #if !defined (__ACE_INLINE__)
9 #include "ace/DEV_Connector.inl"
10 #endif /* __ACE_INLINE__ */
12 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
14 ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Connector
)
17 ACE_DEV_Connector::dump () const
19 #if defined (ACE_HAS_DUMP)
20 ACE_TRACE ("ACE_DEV_Connector::dump");
21 #endif /* ACE_HAS_DUMP */
24 ACE_DEV_Connector::ACE_DEV_Connector ()
26 ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector");
30 ACE_DEV_Connector::connect (ACE_DEV_IO
&new_io
,
31 const ACE_DEV_Addr
&remote_sap
,
32 ACE_Time_Value
*timeout
,
38 ACE_TRACE ("ACE_DEV_Connector::connect");
40 ACE_HANDLE handle
= ACE::handle_timed_open (timeout
,
41 remote_sap
.get_path_name (),
43 new_io
.set_handle (handle
);
44 new_io
.addr_
= remote_sap
; // class copy.
45 return handle
== ACE_INVALID_HANDLE
? -1 : 0;
48 ACE_END_VERSIONED_NAMESPACE_DECL