11 #ifndef ASIO_LOCAL_CONNECT_PAIR_HPP 12 #define ASIO_LOCAL_CONNECT_PAIR_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_HAS_LOCAL_SOCKETS) \ 21 || defined(GENERATING_DOCUMENTATION) 35 template <
typename Protocol,
typename SocketService1,
typename SocketService2>
37 basic_socket<Protocol, SocketService1>& socket1,
38 basic_socket<Protocol, SocketService2>& socket2);
41 template <
typename Protocol,
typename SocketService1,
typename SocketService2>
43 basic_socket<Protocol, SocketService1>& socket1,
44 basic_socket<Protocol, SocketService2>& socket2,
47 template <
typename Protocol,
typename SocketService1,
typename SocketService2>
48 inline void connect_pair(
49 basic_socket<Protocol, SocketService1>& socket1,
50 basic_socket<Protocol, SocketService2>& socket2)
53 connect_pair(socket1, socket2, ec);
57 template <
typename Protocol,
typename SocketService1,
typename SocketService2>
59 basic_socket<Protocol, SocketService1>& socket1,
60 basic_socket<Protocol, SocketService2>& socket2,
64 asio::local::basic_endpoint<Protocol>* tmp
65 =
static_cast<typename Protocol::endpoint*
>(0);
71 protocol.type(), protocol.protocol(), sv, ec)
75 if (socket1.assign(protocol, sv[0], ec))
84 if (socket2.assign(protocol, sv[1], ec))
87 socket1.close(temp_ec);
101 #endif // defined(ASIO_HAS_LOCAL_SOCKETS) 104 #endif // ASIO_LOCAL_CONNECT_PAIR_HPP void throw_error(const asio::error_code &err)
int socketpair(int af, int type, int protocol, socket_type sv[2], asio::error_code &ec)
Class to represent an error code value.
const int socket_error_retval
int close(socket_type s, state_type &state, bool destruction, asio::error_code &ec)