diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /libs/asio/test/ip | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/asio/test/ip')
-rw-r--r-- | libs/asio/test/ip/address.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/address_v4.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/address_v6.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/basic_endpoint.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/basic_resolver.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/basic_resolver_entry.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/basic_resolver_iterator.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/basic_resolver_query.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/host_name.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/icmp.cpp | 11 | ||||
-rw-r--r-- | libs/asio/test/ip/multicast.cpp | 38 | ||||
-rw-r--r-- | libs/asio/test/ip/resolver_query_base.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/resolver_service.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/tcp.cpp | 20 | ||||
-rw-r--r-- | libs/asio/test/ip/udp.cpp | 11 | ||||
-rw-r--r-- | libs/asio/test/ip/unicast.cpp | 2 | ||||
-rw-r--r-- | libs/asio/test/ip/v6_only.cpp | 2 |
17 files changed, 61 insertions, 45 deletions
diff --git a/libs/asio/test/ip/address.cpp b/libs/asio/test/ip/address.cpp index ca183f8fd..2ebc18a8d 100644 --- a/libs/asio/test/ip/address.cpp +++ b/libs/asio/test/ip/address.cpp @@ -2,7 +2,7 @@ // address.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/address_v4.cpp b/libs/asio/test/ip/address_v4.cpp index 80ab8d8c6..3e74e1ec8 100644 --- a/libs/asio/test/ip/address_v4.cpp +++ b/libs/asio/test/ip/address_v4.cpp @@ -2,7 +2,7 @@ // address_v4.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/address_v6.cpp b/libs/asio/test/ip/address_v6.cpp index a955698c6..089859212 100644 --- a/libs/asio/test/ip/address_v6.cpp +++ b/libs/asio/test/ip/address_v6.cpp @@ -2,7 +2,7 @@ // address_v6.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/basic_endpoint.cpp b/libs/asio/test/ip/basic_endpoint.cpp index 635ab9e20..51adb4b7b 100644 --- a/libs/asio/test/ip/basic_endpoint.cpp +++ b/libs/asio/test/ip/basic_endpoint.cpp @@ -2,7 +2,7 @@ // basic_endpoint.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/basic_resolver.cpp b/libs/asio/test/ip/basic_resolver.cpp index e882bb454..1aa293547 100644 --- a/libs/asio/test/ip/basic_resolver.cpp +++ b/libs/asio/test/ip/basic_resolver.cpp @@ -2,7 +2,7 @@ // basic_resolver.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/basic_resolver_entry.cpp b/libs/asio/test/ip/basic_resolver_entry.cpp index b82ae30ff..2f7864ccb 100644 --- a/libs/asio/test/ip/basic_resolver_entry.cpp +++ b/libs/asio/test/ip/basic_resolver_entry.cpp @@ -2,7 +2,7 @@ // basic_resolver_entry.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/basic_resolver_iterator.cpp b/libs/asio/test/ip/basic_resolver_iterator.cpp index d886e8e64..d69648cc1 100644 --- a/libs/asio/test/ip/basic_resolver_iterator.cpp +++ b/libs/asio/test/ip/basic_resolver_iterator.cpp @@ -2,7 +2,7 @@ // basic_resolver_iterator.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/basic_resolver_query.cpp b/libs/asio/test/ip/basic_resolver_query.cpp index 78886ea78..1d28827f8 100644 --- a/libs/asio/test/ip/basic_resolver_query.cpp +++ b/libs/asio/test/ip/basic_resolver_query.cpp @@ -2,7 +2,7 @@ // basic_resolver_query.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/host_name.cpp b/libs/asio/test/ip/host_name.cpp index 89eba06c7..2c46b29df 100644 --- a/libs/asio/test/ip/host_name.cpp +++ b/libs/asio/test/ip/host_name.cpp @@ -2,7 +2,7 @@ // host_name.cpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/icmp.cpp b/libs/asio/test/ip/icmp.cpp index e2cc35035..cebe8e3b1 100644 --- a/libs/asio/test/ip/icmp.cpp +++ b/libs/asio/test/ip/icmp.cpp @@ -2,7 +2,7 @@ // icmp.cpp // ~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -75,7 +75,8 @@ void test() ip::icmp::socket socket4(ios, ip::icmp::endpoint(ip::icmp::v4(), 0)); ip::icmp::socket socket5(ios, ip::icmp::endpoint(ip::icmp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::icmp::socket::native_handle_type native_socket1 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ip::icmp::socket socket6(ios, ip::icmp::v4(), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -111,9 +112,11 @@ void test() socket1.open(ip::icmp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::icmp::socket::native_handle_type native_socket2 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::icmp::v4(), native_socket2); - int native_socket3 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::icmp::socket::native_handle_type native_socket3 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::icmp::v4(), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/ip/multicast.cpp b/libs/asio/test/ip/multicast.cpp index b5be1c276..faa894499 100644 --- a/libs/asio/test/ip/multicast.cpp +++ b/libs/asio/test/ip/multicast.cpp @@ -2,7 +2,7 @@ // multicast.cpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -169,30 +169,34 @@ void test() { ip::multicast::join_group join_group(multicast_address_v4); sock_v4.set_option(join_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + BOOST_ASIO_CHECK_MESSAGE(!ec || ec == error::no_such_device, + ec.value() << ", " << ec.message()); + + if (!ec) + { + // leave_group class. + + ip::multicast::leave_group leave_group(multicast_address_v4); + sock_v4.set_option(leave_group, ec); + BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + } } if (have_v6) { ip::multicast::join_group join_group(multicast_address_v6); sock_v6.set_option(join_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); - } + BOOST_ASIO_CHECK_MESSAGE(!ec || ec == error::no_such_device, + ec.value() << ", " << ec.message()); - // leave_group class. + if (!ec) + { + // leave_group class. - if (have_v4) - { - ip::multicast::leave_group leave_group(multicast_address_v4); - sock_v4.set_option(leave_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); - } - - if (have_v6) - { - ip::multicast::leave_group leave_group(multicast_address_v6); - sock_v6.set_option(leave_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + ip::multicast::leave_group leave_group(multicast_address_v6); + sock_v6.set_option(leave_group, ec); + BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + } } // outbound_interface class. diff --git a/libs/asio/test/ip/resolver_query_base.cpp b/libs/asio/test/ip/resolver_query_base.cpp index c69942c23..37ae816a4 100644 --- a/libs/asio/test/ip/resolver_query_base.cpp +++ b/libs/asio/test/ip/resolver_query_base.cpp @@ -2,7 +2,7 @@ // resolver_query_base.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/resolver_service.cpp b/libs/asio/test/ip/resolver_service.cpp index aa1d0435d..ab46a4113 100644 --- a/libs/asio/test/ip/resolver_service.cpp +++ b/libs/asio/test/ip/resolver_service.cpp @@ -2,7 +2,7 @@ // resolver_service.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/tcp.cpp b/libs/asio/test/ip/tcp.cpp index e8e13e5c6..dd5e033a9 100644 --- a/libs/asio/test/ip/tcp.cpp +++ b/libs/asio/test/ip/tcp.cpp @@ -2,7 +2,7 @@ // tcp.cpp // ~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -198,7 +198,8 @@ void test() ip::tcp::socket socket4(ios, ip::tcp::endpoint(ip::tcp::v4(), 0)); ip::tcp::socket socket5(ios, ip::tcp::endpoint(ip::tcp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::socket::native_handle_type native_socket1 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ip::tcp::socket socket6(ios, ip::tcp::v4(), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -234,9 +235,11 @@ void test() socket1.open(ip::tcp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::socket::native_handle_type native_socket2 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); socket1.assign(ip::tcp::v4(), native_socket2); - int native_socket3 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::socket::native_handle_type native_socket3 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); socket1.assign(ip::tcp::v4(), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -657,7 +660,8 @@ void test() ip::tcp::acceptor acceptor4(ios, ip::tcp::endpoint(ip::tcp::v4(), 0)); ip::tcp::acceptor acceptor5(ios, ip::tcp::endpoint(ip::tcp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_acceptor1 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::acceptor::native_handle_type native_acceptor1 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ip::tcp::acceptor acceptor6(ios, ip::tcp::v4(), native_acceptor1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -685,9 +689,11 @@ void test() acceptor1.open(ip::tcp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_acceptor2 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::acceptor::native_handle_type native_acceptor2 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); acceptor1.assign(ip::tcp::v4(), native_acceptor2); - int native_acceptor3 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::acceptor::native_handle_type native_acceptor3 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); acceptor1.assign(ip::tcp::v4(), native_acceptor3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/ip/udp.cpp b/libs/asio/test/ip/udp.cpp index 428ed0ee0..445ef87a6 100644 --- a/libs/asio/test/ip/udp.cpp +++ b/libs/asio/test/ip/udp.cpp @@ -2,7 +2,7 @@ // udp.cpp // ~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -80,7 +80,8 @@ void test() ip::udp::socket socket4(ios, ip::udp::endpoint(ip::udp::v4(), 0)); ip::udp::socket socket5(ios, ip::udp::endpoint(ip::udp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::udp::socket::native_handle_type native_socket1 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ip::udp::socket socket6(ios, ip::udp::v4(), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -116,9 +117,11 @@ void test() socket1.open(ip::udp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::udp::socket::native_handle_type native_socket2 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::udp::v4(), native_socket2); - int native_socket3 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::udp::socket::native_handle_type native_socket3 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::udp::v4(), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/ip/unicast.cpp b/libs/asio/test/ip/unicast.cpp index 4f342c03d..ada33d541 100644 --- a/libs/asio/test/ip/unicast.cpp +++ b/libs/asio/test/ip/unicast.cpp @@ -2,7 +2,7 @@ // unicast.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libs/asio/test/ip/v6_only.cpp b/libs/asio/test/ip/v6_only.cpp index 3b9487394..f5045da45 100644 --- a/libs/asio/test/ip/v6_only.cpp +++ b/libs/asio/test/ip/v6_only.cpp @@ -2,7 +2,7 @@ // v6_only.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |