summaryrefslogtreecommitdiff
path: root/ACE/ace/LSOCK_Connector.inl
blob: f9cdffbf6dc8ed0733ae3dc200e443968c7d4982 (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
// -*- C++ -*-
//
// $Id$

ACE_BEGIN_VERSIONED_NAMESPACE_DECL

// Establish a connection.
ACE_INLINE int
ACE_LSOCK_Connector::connect (ACE_LSOCK_Stream &new_stream,
                              const ACE_UNIX_Addr &remote_sap,
                              ACE_Time_Value *timeout,
                              const ACE_Addr &local_sap,
                              int reuse_addr,
                              int flags,
                              int perms)
{
  ACE_TRACE ("ACE_LSOCK_Connector::connect");
  int result = ACE_SOCK_Connector::connect (new_stream, remote_sap,
                                            timeout, local_sap,
                                            reuse_addr, flags, perms);
  if (result != -1)
    // This is necessary due to the weird inheritance relationships of ACE_LSOCK_Stream.
    new_stream.set_handle (new_stream.get_handle ());
  return result;
}

ACE_END_VERSIONED_NAMESPACE_DECL