2 // Open versioned namespace, if enabled by the user.
3 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
6 ACE_ATM_Connector::dump () const
8 #if defined (ACE_HAS_DUMP)
9 ACE_TRACE ("ACE_ATM_Connector::dump");
10 #endif /* ACE_HAS_DUMP */
14 ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream,
15 const ACE_ATM_Addr &remote_sap,
16 ACE_ATM_Params params,
18 ACE_Time_Value *timeout,
19 const ACE_ATM_Addr &local_sap,
24 ACE_TRACE ("ACE_ATM_Connector::ACE_ATM_Connector");
25 if ((ACE_HANDLE)this->connect (new_stream,
33 perms) == ACE_INVALID_HANDLE
34 && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
35 ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
36 ACE_TEXT ("ACE_ATM_Stream::ACE_ATM_Stream")));
39 // Try to complete a non-blocking connection.
43 ACE_ATM_Connector::complete (ACE_ATM_Stream &new_stream,
44 ACE_ATM_Addr *remote_sap,
47 ACE_TRACE ("ACE_ATM_Connector::complete");
48 #if defined (ACE_HAS_ATM)
49 return connector_.complete(new_stream.get_stream(),
53 ACE_UNUSED_ARG(new_stream);
54 ACE_UNUSED_ARG(remote_sap);
62 ACE_ATM_Connector::add_leaf (ACE_ATM_Stream ¤t_stream,
63 const ACE_Addr &remote_sap,
66 ACE_TRACE ("ACE_ATM_Connector::add_leaf");
67 #if defined (ACE_HAS_FORE_ATM_XTI)
68 return connector_.add_leaf(current_stream.get_stream(),
72 #elif defined (ACE_HAS_FORE_ATM_WS2)
73 struct sockaddr_atm *saddr = (struct sockaddr_atm *)remote_sap.get_addr();
74 ACE_QoS cqos = qos.get_qos();
75 int addr_len = sizeof( struct sockaddr_atm);
77 ACE_QoS_Params qos_params(0,
83 ACE_OS::printf( "ATM_Connector::add_leaf: connecting...\n");
85 ACE_HANDLE result = ACE_OS::join_leaf(current_stream.get_handle(),
86 (struct sockaddr *)saddr,
90 if ( result == ACE_INVALID_HANDLE )
91 ACE_OS::printf( "ATM_Connector(add_leaf): connection failed, %d\n",
94 return (result != ACE_INVALID_HANDLE);
95 #elif defined (ACE_HAS_LINUX_ATM)
96 ACE_OS::printf("ATM_Connector(add_leaf): not yet implemented in Linux\n");
98 ACE_UNUSED_ARG(current_stream);
99 ACE_UNUSED_ARG(remote_sap);
100 ACE_UNUSED_ARG(leaf_id);
101 ACE_UNUSED_ARG(timeout);
105 ACE_UNUSED_ARG(current_stream);
106 ACE_UNUSED_ARG(remote_sap);
107 ACE_UNUSED_ARG(leaf_id);
108 ACE_UNUSED_ARG(timeout);
115 ACE_ATM_Connector::reset_new_handle (ACE_HANDLE handle)
117 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
118 // Reset the event association
119 return ::WSAEventSelect ((SOCKET) handle,
122 #else /* !defined ACE_HAS_WINSOCK2 */
123 ACE_UNUSED_ARG (handle);
125 #endif /* ACE_WIN32 */
128 // Close versioned namespace, if enabled by the user.
129 ACE_END_VERSIONED_NAMESPACE_DECL