summaryrefslogtreecommitdiff
path: root/boost/asio/ip
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:22:41 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:22:41 +0900
commit3c1df2168531ad5580076ae08d529054689aeedd (patch)
tree941aff6f86393eecacddfec252a8508c7e8351c9 /boost/asio/ip
parentd6a306e745acfee00e81ccaf3324a2a03516db41 (diff)
downloadboost-3c1df2168531ad5580076ae08d529054689aeedd.tar.gz
boost-3c1df2168531ad5580076ae08d529054689aeedd.tar.bz2
boost-3c1df2168531ad5580076ae08d529054689aeedd.zip
Imported Upstream version 1.70.0upstream/1.70.0
Diffstat (limited to 'boost/asio/ip')
-rw-r--r--boost/asio/ip/address.hpp62
-rw-r--r--boost/asio/ip/address_v4.hpp58
-rw-r--r--boost/asio/ip/address_v4_iterator.hpp2
-rw-r--r--boost/asio/ip/address_v4_range.hpp2
-rw-r--r--boost/asio/ip/address_v6.hpp77
-rw-r--r--boost/asio/ip/address_v6_iterator.hpp2
-rw-r--r--boost/asio/ip/address_v6_range.hpp2
-rw-r--r--boost/asio/ip/bad_address_cast.hpp2
-rw-r--r--boost/asio/ip/basic_endpoint.hpp47
-rw-r--r--boost/asio/ip/basic_resolver.hpp306
-rw-r--r--boost/asio/ip/basic_resolver_entry.hpp2
-rw-r--r--boost/asio/ip/basic_resolver_iterator.hpp2
-rw-r--r--boost/asio/ip/basic_resolver_query.hpp2
-rw-r--r--boost/asio/ip/basic_resolver_results.hpp2
-rw-r--r--boost/asio/ip/detail/endpoint.hpp40
-rw-r--r--boost/asio/ip/detail/impl/endpoint.ipp20
-rw-r--r--boost/asio/ip/detail/socket_option.hpp2
-rw-r--r--boost/asio/ip/host_name.hpp2
-rw-r--r--boost/asio/ip/icmp.hpp2
-rw-r--r--boost/asio/ip/impl/address.hpp2
-rw-r--r--boost/asio/ip/impl/address.ipp41
-rw-r--r--boost/asio/ip/impl/address_v4.hpp2
-rw-r--r--boost/asio/ip/impl/address_v4.ipp22
-rw-r--r--boost/asio/ip/impl/address_v6.hpp2
-rw-r--r--boost/asio/ip/impl/address_v6.ipp52
-rw-r--r--boost/asio/ip/impl/basic_endpoint.hpp2
-rw-r--r--boost/asio/ip/impl/host_name.ipp2
-rw-r--r--boost/asio/ip/impl/network_v4.hpp2
-rw-r--r--boost/asio/ip/impl/network_v4.ipp2
-rw-r--r--boost/asio/ip/impl/network_v6.hpp2
-rw-r--r--boost/asio/ip/impl/network_v6.ipp2
-rw-r--r--boost/asio/ip/multicast.hpp16
-rw-r--r--boost/asio/ip/network_v4.hpp2
-rw-r--r--boost/asio/ip/network_v6.hpp2
-rw-r--r--boost/asio/ip/resolver_base.hpp2
-rw-r--r--boost/asio/ip/resolver_query_base.hpp2
-rw-r--r--boost/asio/ip/resolver_service.hpp202
-rw-r--r--boost/asio/ip/tcp.hpp6
-rw-r--r--boost/asio/ip/udp.hpp2
-rw-r--r--boost/asio/ip/unicast.hpp6
-rw-r--r--boost/asio/ip/v6_only.hpp6
41 files changed, 400 insertions, 613 deletions
diff --git a/boost/asio/ip/address.hpp b/boost/asio/ip/address.hpp
index 9b0cbdd3ee..fd6ce95850 100644
--- a/boost/asio/ip/address.hpp
+++ b/boost/asio/ip/address.hpp
@@ -2,7 +2,7 @@
// ip/address.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -48,46 +48,48 @@ class address
{
public:
/// Default constructor.
- BOOST_ASIO_DECL address();
+ BOOST_ASIO_DECL address() BOOST_ASIO_NOEXCEPT;
/// Construct an address from an IPv4 address.
- BOOST_ASIO_DECL address(const boost::asio::ip::address_v4& ipv4_address);
+ BOOST_ASIO_DECL address(
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT;
/// Construct an address from an IPv6 address.
- BOOST_ASIO_DECL address(const boost::asio::ip::address_v6& ipv6_address);
+ BOOST_ASIO_DECL address(
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT;
/// Copy constructor.
- BOOST_ASIO_DECL address(const address& other);
+ BOOST_ASIO_DECL address(const address& other) BOOST_ASIO_NOEXCEPT;
#if defined(BOOST_ASIO_HAS_MOVE)
/// Move constructor.
- BOOST_ASIO_DECL address(address&& other);
+ BOOST_ASIO_DECL address(address&& other) BOOST_ASIO_NOEXCEPT;
#endif // defined(BOOST_ASIO_HAS_MOVE)
/// Assign from another address.
- BOOST_ASIO_DECL address& operator=(const address& other);
+ BOOST_ASIO_DECL address& operator=(const address& other) BOOST_ASIO_NOEXCEPT;
#if defined(BOOST_ASIO_HAS_MOVE)
/// Move-assign from another address.
- BOOST_ASIO_DECL address& operator=(address&& other);
+ BOOST_ASIO_DECL address& operator=(address&& other) BOOST_ASIO_NOEXCEPT;
#endif // defined(BOOST_ASIO_HAS_MOVE)
/// Assign from an IPv4 address.
BOOST_ASIO_DECL address& operator=(
- const boost::asio::ip::address_v4& ipv4_address);
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT;
/// Assign from an IPv6 address.
BOOST_ASIO_DECL address& operator=(
- const boost::asio::ip::address_v6& ipv6_address);
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT;
/// Get whether the address is an IP version 4 address.
- bool is_v4() const
+ bool is_v4() const BOOST_ASIO_NOEXCEPT
{
return type_ == ipv4;
}
/// Get whether the address is an IP version 6 address.
- bool is_v6() const
+ bool is_v6() const BOOST_ASIO_NOEXCEPT
{
return type_ == ipv6;
}
@@ -128,40 +130,46 @@ public:
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- BOOST_ASIO_DECL bool is_loopback() const;
+ BOOST_ASIO_DECL bool is_loopback() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is unspecified.
- BOOST_ASIO_DECL bool is_unspecified() const;
+ BOOST_ASIO_DECL bool is_unspecified() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is a multicast address.
- BOOST_ASIO_DECL bool is_multicast() const;
+ BOOST_ASIO_DECL bool is_multicast() const BOOST_ASIO_NOEXCEPT;
/// Compare two addresses for equality.
- BOOST_ASIO_DECL friend bool operator==(const address& a1, const address& a2);
+ BOOST_ASIO_DECL friend bool operator==(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT;
/// Compare two addresses for inequality.
- friend bool operator!=(const address& a1, const address& a2)
+ friend bool operator!=(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
{
return !(a1 == a2);
}
/// Compare addresses for ordering.
- BOOST_ASIO_DECL friend bool operator<(const address& a1, const address& a2);
+ BOOST_ASIO_DECL friend bool operator<(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT;
/// Compare addresses for ordering.
- friend bool operator>(const address& a1, const address& a2)
+ friend bool operator>(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
{
return a2 < a1;
}
/// Compare addresses for ordering.
- friend bool operator<=(const address& a1, const address& a2)
+ friend bool operator<=(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
{
return !(a2 < a1);
}
/// Compare addresses for ordering.
- friend bool operator>=(const address& a1, const address& a2)
+ friend bool operator>=(const address& a1,
+ const address& a2) BOOST_ASIO_NOEXCEPT
{
return !(a1 < a2);
}
@@ -189,8 +197,8 @@ BOOST_ASIO_DECL address make_address(const char* str);
/**
* @relates address
*/
-BOOST_ASIO_DECL address make_address(
- const char* str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address make_address(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
/// Create an address from an IPv4 address string in dotted decimal form,
/// or from an IPv6 address in hexadecimal notation.
@@ -204,8 +212,8 @@ BOOST_ASIO_DECL address make_address(const std::string& str);
/**
* @relates address
*/
-BOOST_ASIO_DECL address make_address(
- const std::string& str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address make_address(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
@@ -222,8 +230,8 @@ BOOST_ASIO_DECL address make_address(string_view str);
/**
* @relates address
*/
-BOOST_ASIO_DECL address make_address(
- string_view str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address make_address(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/boost/asio/ip/address_v4.hpp b/boost/asio/ip/address_v4.hpp
index 68d724085d..b612fa0cd7 100644
--- a/boost/asio/ip/address_v4.hpp
+++ b/boost/asio/ip/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/address_v4.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -61,7 +61,7 @@ public:
#endif
/// Default constructor.
- address_v4()
+ address_v4() BOOST_ASIO_NOEXCEPT
{
addr_.s_addr = 0;
}
@@ -73,21 +73,21 @@ public:
BOOST_ASIO_DECL explicit address_v4(uint_type addr);
/// Copy constructor.
- address_v4(const address_v4& other)
+ address_v4(const address_v4& other) BOOST_ASIO_NOEXCEPT
: addr_(other.addr_)
{
}
#if defined(BOOST_ASIO_HAS_MOVE)
/// Move constructor.
- address_v4(address_v4&& other)
+ address_v4(address_v4&& other) BOOST_ASIO_NOEXCEPT
: addr_(other.addr_)
{
}
#endif // defined(BOOST_ASIO_HAS_MOVE)
/// Assign from another address.
- address_v4& operator=(const address_v4& other)
+ address_v4& operator=(const address_v4& other) BOOST_ASIO_NOEXCEPT
{
addr_ = other.addr_;
return *this;
@@ -95,7 +95,7 @@ public:
#if defined(BOOST_ASIO_HAS_MOVE)
/// Move-assign from another address.
- address_v4& operator=(address_v4&& other)
+ address_v4& operator=(address_v4&& other) BOOST_ASIO_NOEXCEPT
{
addr_ = other.addr_;
return *this;
@@ -103,10 +103,10 @@ public:
#endif // defined(BOOST_ASIO_HAS_MOVE)
/// Get the address in bytes, in network byte order.
- BOOST_ASIO_DECL bytes_type to_bytes() const;
+ BOOST_ASIO_DECL bytes_type to_bytes() const BOOST_ASIO_NOEXCEPT;
/// Get the address as an unsigned integer in host byte order
- BOOST_ASIO_DECL uint_type to_uint() const;
+ BOOST_ASIO_DECL uint_type to_uint() const BOOST_ASIO_NOEXCEPT;
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// Get the address as an unsigned long in host byte order
@@ -141,10 +141,10 @@ public:
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- BOOST_ASIO_DECL bool is_loopback() const;
+ BOOST_ASIO_DECL bool is_loopback() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is unspecified.
- BOOST_ASIO_DECL bool is_unspecified() const;
+ BOOST_ASIO_DECL bool is_unspecified() const BOOST_ASIO_NOEXCEPT;
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: Use network_v4 class.) Determine whether the address is a
@@ -161,58 +161,64 @@ public:
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Determine whether the address is a multicast address.
- BOOST_ASIO_DECL bool is_multicast() const;
+ BOOST_ASIO_DECL bool is_multicast() const BOOST_ASIO_NOEXCEPT;
/// Compare two addresses for equality.
- friend bool operator==(const address_v4& a1, const address_v4& a2)
+ friend bool operator==(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
{
return a1.addr_.s_addr == a2.addr_.s_addr;
}
/// Compare two addresses for inequality.
- friend bool operator!=(const address_v4& a1, const address_v4& a2)
+ friend bool operator!=(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
{
return a1.addr_.s_addr != a2.addr_.s_addr;
}
/// Compare addresses for ordering.
- friend bool operator<(const address_v4& a1, const address_v4& a2)
+ friend bool operator<(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
{
return a1.to_uint() < a2.to_uint();
}
/// Compare addresses for ordering.
- friend bool operator>(const address_v4& a1, const address_v4& a2)
+ friend bool operator>(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
{
return a1.to_uint() > a2.to_uint();
}
/// Compare addresses for ordering.
- friend bool operator<=(const address_v4& a1, const address_v4& a2)
+ friend bool operator<=(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
{
return a1.to_uint() <= a2.to_uint();
}
/// Compare addresses for ordering.
- friend bool operator>=(const address_v4& a1, const address_v4& a2)
+ friend bool operator>=(const address_v4& a1,
+ const address_v4& a2) BOOST_ASIO_NOEXCEPT
{
return a1.to_uint() >= a2.to_uint();
}
/// Obtain an address object that represents any address.
- static address_v4 any()
+ static address_v4 any() BOOST_ASIO_NOEXCEPT
{
return address_v4();
}
/// Obtain an address object that represents the loopback address.
- static address_v4 loopback()
+ static address_v4 loopback() BOOST_ASIO_NOEXCEPT
{
return address_v4(0x7F000001);
}
/// Obtain an address object that represents the broadcast address.
- static address_v4 broadcast()
+ static address_v4 broadcast() BOOST_ASIO_NOEXCEPT
{
return address_v4(0xFFFFFFFF);
}
@@ -262,8 +268,8 @@ BOOST_ASIO_DECL address_v4 make_address_v4(const char* str);
/**
* @relates address_v4
*/
-BOOST_ASIO_DECL address_v4 make_address_v4(
- const char* str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address_v4 make_address_v4(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
/// Create an IPv4 address from an IP address string in dotted decimal form.
/**
@@ -275,8 +281,8 @@ BOOST_ASIO_DECL address_v4 make_address_v4(const std::string& str);
/**
* @relates address_v4
*/
-BOOST_ASIO_DECL address_v4 make_address_v4(
- const std::string& str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address_v4 make_address_v4(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
@@ -291,8 +297,8 @@ BOOST_ASIO_DECL address_v4 make_address_v4(string_view str);
/**
* @relates address_v4
*/
-BOOST_ASIO_DECL address_v4 make_address_v4(
- string_view str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address_v4 make_address_v4(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/boost/asio/ip/address_v4_iterator.hpp b/boost/asio/ip/address_v4_iterator.hpp
index 3574cda1e9..5a52fe0e1a 100644
--- a/boost/asio/ip/address_v4_iterator.hpp
+++ b/boost/asio/ip/address_v4_iterator.hpp
@@ -2,7 +2,7 @@
// ip/address_v4_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/address_v4_range.hpp b/boost/asio/ip/address_v4_range.hpp
index 261ead22ac..5e9c548bea 100644
--- a/boost/asio/ip/address_v4_range.hpp
+++ b/boost/asio/ip/address_v4_range.hpp
@@ -2,7 +2,7 @@
// ip/address_v4_range.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/address_v6.hpp b/boost/asio/ip/address_v6.hpp
index 8c4ac0a732..62dff45c54 100644
--- a/boost/asio/ip/address_v6.hpp
+++ b/boost/asio/ip/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/address_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -60,33 +60,34 @@ public:
#endif
/// Default constructor.
- BOOST_ASIO_DECL address_v6();
+ BOOST_ASIO_DECL address_v6() BOOST_ASIO_NOEXCEPT;
/// Construct an address from raw bytes and scope ID.
BOOST_ASIO_DECL explicit address_v6(const bytes_type& bytes,
unsigned long scope_id = 0);
/// Copy constructor.
- BOOST_ASIO_DECL address_v6(const address_v6& other);
+ BOOST_ASIO_DECL address_v6(const address_v6& other) BOOST_ASIO_NOEXCEPT;
#if defined(BOOST_ASIO_HAS_MOVE)
/// Move constructor.
- BOOST_ASIO_DECL address_v6(address_v6&& other);
+ BOOST_ASIO_DECL address_v6(address_v6&& other) BOOST_ASIO_NOEXCEPT;
#endif // defined(BOOST_ASIO_HAS_MOVE)
/// Assign from another address.
- BOOST_ASIO_DECL address_v6& operator=(const address_v6& other);
+ BOOST_ASIO_DECL address_v6& operator=(
+ const address_v6& other) BOOST_ASIO_NOEXCEPT;
#if defined(BOOST_ASIO_HAS_MOVE)
/// Move-assign from another address.
- BOOST_ASIO_DECL address_v6& operator=(address_v6&& other);
+ BOOST_ASIO_DECL address_v6& operator=(address_v6&& other) BOOST_ASIO_NOEXCEPT;
#endif // defined(BOOST_ASIO_HAS_MOVE)
/// The scope ID of the address.
/**
* Returns the scope ID associated with the IPv6 address.
*/
- unsigned long scope_id() const
+ unsigned long scope_id() const BOOST_ASIO_NOEXCEPT
{
return scope_id_;
}
@@ -95,13 +96,13 @@ public:
/**
* Modifies the scope ID associated with the IPv6 address.
*/
- void scope_id(unsigned long id)
+ void scope_id(unsigned long id) BOOST_ASIO_NOEXCEPT
{
scope_id_ = id;
}
/// Get the address in bytes, in network byte order.
- BOOST_ASIO_DECL bytes_type to_bytes() const;
+ BOOST_ASIO_DECL bytes_type to_bytes() const BOOST_ASIO_NOEXCEPT;
/// Get the address as a string.
BOOST_ASIO_DECL std::string to_string() const;
@@ -134,19 +135,19 @@ public:
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- BOOST_ASIO_DECL bool is_loopback() const;
+ BOOST_ASIO_DECL bool is_loopback() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is unspecified.
- BOOST_ASIO_DECL bool is_unspecified() const;
+ BOOST_ASIO_DECL bool is_unspecified() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is link local.
- BOOST_ASIO_DECL bool is_link_local() const;
+ BOOST_ASIO_DECL bool is_link_local() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is site local.
- BOOST_ASIO_DECL bool is_site_local() const;
+ BOOST_ASIO_DECL bool is_site_local() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is a mapped IPv4 address.
- BOOST_ASIO_DECL bool is_v4_mapped() const;
+ BOOST_ASIO_DECL bool is_v4_mapped() const BOOST_ASIO_NOEXCEPT;
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: No replacement.) Determine whether the address is an
@@ -155,63 +156,67 @@ public:
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Determine whether the address is a multicast address.
- BOOST_ASIO_DECL bool is_multicast() const;
+ BOOST_ASIO_DECL bool is_multicast() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is a global multicast address.
- BOOST_ASIO_DECL bool is_multicast_global() const;
+ BOOST_ASIO_DECL bool is_multicast_global() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is a link-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_link_local() const;
+ BOOST_ASIO_DECL bool is_multicast_link_local() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is a node-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_node_local() const;
+ BOOST_ASIO_DECL bool is_multicast_node_local() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is a org-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_org_local() const;
+ BOOST_ASIO_DECL bool is_multicast_org_local() const BOOST_ASIO_NOEXCEPT;
/// Determine whether the address is a site-local multicast address.
- BOOST_ASIO_DECL bool is_multicast_site_local() const;
+ BOOST_ASIO_DECL bool is_multicast_site_local() const BOOST_ASIO_NOEXCEPT;
/// Compare two addresses for equality.
- BOOST_ASIO_DECL friend bool operator==(
- const address_v6& a1, const address_v6& a2);
+ BOOST_ASIO_DECL friend bool operator==(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT;
/// Compare two addresses for inequality.
- friend bool operator!=(const address_v6& a1, const address_v6& a2)
+ friend bool operator!=(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
{
return !(a1 == a2);
}
/// Compare addresses for ordering.
- BOOST_ASIO_DECL friend bool operator<(
- const address_v6& a1, const address_v6& a2);
+ BOOST_ASIO_DECL friend bool operator<(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT;
/// Compare addresses for ordering.
- friend bool operator>(const address_v6& a1, const address_v6& a2)
+ friend bool operator>(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
{
return a2 < a1;
}
/// Compare addresses for ordering.
- friend bool operator<=(const address_v6& a1, const address_v6& a2)
+ friend bool operator<=(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
{
return !(a2 < a1);
}
/// Compare addresses for ordering.
- friend bool operator>=(const address_v6& a1, const address_v6& a2)
+ friend bool operator>=(const address_v6& a1,
+ const address_v6& a2) BOOST_ASIO_NOEXCEPT
{
return !(a1 < a2);
}
/// Obtain an address object that represents any address.
- static address_v6 any()
+ static address_v6 any() BOOST_ASIO_NOEXCEPT
{
return address_v6();
}
/// Obtain an address object that represents the loopback address.
- BOOST_ASIO_DECL static address_v6 loopback();
+ BOOST_ASIO_DECL static address_v6 loopback() BOOST_ASIO_NOEXCEPT;
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address.
@@ -251,8 +256,8 @@ BOOST_ASIO_DECL address_v6 make_address_v6(const char* str);
/**
* @relates address_v6
*/
-BOOST_ASIO_DECL address_v6 make_address_v6(
- const char* str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address_v6 make_address_v6(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
/// Createan IPv6 address from an IP address string.
/**
@@ -264,8 +269,8 @@ BOOST_ASIO_DECL address_v6 make_address_v6(const std::string& str);
/**
* @relates address_v6
*/
-BOOST_ASIO_DECL address_v6 make_address_v6(
- const std::string& str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address_v6 make_address_v6(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
@@ -280,8 +285,8 @@ BOOST_ASIO_DECL address_v6 make_address_v6(string_view str);
/**
* @relates address_v6
*/
-BOOST_ASIO_DECL address_v6 make_address_v6(
- string_view str, boost::system::error_code& ec);
+BOOST_ASIO_DECL address_v6 make_address_v6(string_view str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT;
#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
diff --git a/boost/asio/ip/address_v6_iterator.hpp b/boost/asio/ip/address_v6_iterator.hpp
index 887b09f79a..4598a872b2 100644
--- a/boost/asio/ip/address_v6_iterator.hpp
+++ b/boost/asio/ip/address_v6_iterator.hpp
@@ -2,7 +2,7 @@
// ip/address_v6_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/ip/address_v6_range.hpp b/boost/asio/ip/address_v6_range.hpp
index 0a095cd80b..9189fde3c9 100644
--- a/boost/asio/ip/address_v6_range.hpp
+++ b/boost/asio/ip/address_v6_range.hpp
@@ -2,7 +2,7 @@
// ip/address_v6_range.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/ip/bad_address_cast.hpp b/boost/asio/ip/bad_address_cast.hpp
index fce9f053b1..da06983301 100644
--- a/boost/asio/ip/bad_address_cast.hpp
+++ b/boost/asio/ip/bad_address_cast.hpp
@@ -2,7 +2,7 @@
// ip/bad_address_cast.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/basic_endpoint.hpp b/boost/asio/ip/basic_endpoint.hpp
index bad4114f0b..0951fd70d3 100644
--- a/boost/asio/ip/basic_endpoint.hpp
+++ b/boost/asio/ip/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -57,7 +57,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint()
+ basic_endpoint() BOOST_ASIO_NOEXCEPT
: impl_()
{
}
@@ -79,7 +79,7 @@ public:
* @endcode
*/
basic_endpoint(const InternetProtocol& internet_protocol,
- unsigned short port_num)
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
: impl_(internet_protocol.family(), port_num)
{
}
@@ -87,27 +87,28 @@ public:
/// Construct an endpoint using a port number and an IP address. This
/// constructor may be used for accepting connections on a specific interface
/// or for making a connection to a remote endpoint.
- basic_endpoint(const boost::asio::ip::address& addr, unsigned short port_num)
+ basic_endpoint(const boost::asio::ip::address& addr,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
: impl_(addr, port_num)
{
}
/// Copy constructor.
- basic_endpoint(const basic_endpoint& other)
+ basic_endpoint(const basic_endpoint& other) BOOST_ASIO_NOEXCEPT
: impl_(other.impl_)
{
}
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- basic_endpoint(basic_endpoint&& other)
+ basic_endpoint(basic_endpoint&& other) BOOST_ASIO_NOEXCEPT
: impl_(other.impl_)
{
}
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assign from another endpoint.
- basic_endpoint& operator=(const basic_endpoint& other)
+ basic_endpoint& operator=(const basic_endpoint& other) BOOST_ASIO_NOEXCEPT
{
impl_ = other.impl_;
return *this;
@@ -115,7 +116,7 @@ public:
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assign from another endpoint.
- basic_endpoint& operator=(basic_endpoint&& other)
+ basic_endpoint& operator=(basic_endpoint&& other) BOOST_ASIO_NOEXCEPT
{
impl_ = other.impl_;
return *this;
@@ -123,7 +124,7 @@ public:
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// The protocol associated with the endpoint.
- protocol_type protocol() const
+ protocol_type protocol() const BOOST_ASIO_NOEXCEPT
{
if (impl_.is_v4())
return InternetProtocol::v4();
@@ -131,19 +132,19 @@ public:
}
/// Get the underlying endpoint in the native type.
- data_type* data()
+ data_type* data() BOOST_ASIO_NOEXCEPT
{
return impl_.data();
}
/// Get the underlying endpoint in the native type.
- const data_type* data() const
+ const data_type* data() const BOOST_ASIO_NOEXCEPT
{
return impl_.data();
}
/// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
{
return impl_.size();
}
@@ -155,75 +156,75 @@ public:
}
/// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
{
return impl_.capacity();
}
/// Get the port associated with the endpoint. The port number is always in
/// the host's byte order.
- unsigned short port() const
+ unsigned short port() const BOOST_ASIO_NOEXCEPT
{
return impl_.port();
}
/// Set the port associated with the endpoint. The port number is always in
/// the host's byte order.
- void port(unsigned short port_num)
+ void port(unsigned short port_num) BOOST_ASIO_NOEXCEPT
{
impl_.port(port_num);
}
/// Get the IP address associated with the endpoint.
- boost::asio::ip::address address() const
+ boost::asio::ip::address address() const BOOST_ASIO_NOEXCEPT
{
return impl_.address();
}
/// Set the IP address associated with the endpoint.
- void address(const boost::asio::ip::address& addr)
+ void address(const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT
{
impl_.address(addr);
}
/// Compare two endpoints for equality.
friend bool operator==(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return e1.impl_ == e2.impl_;
}
/// Compare two endpoints for inequality.
friend bool operator!=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return !(e1 == e2);
}
/// Compare endpoints for ordering.
friend bool operator<(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return e1.impl_ < e2.impl_;
}
/// Compare endpoints for ordering.
friend bool operator>(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return e2.impl_ < e1.impl_;
}
/// Compare endpoints for ordering.
friend bool operator<=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return !(e2 < e1);
}
/// Compare endpoints for ordering.
friend bool operator>=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2)
+ const basic_endpoint<InternetProtocol>& e2) BOOST_ASIO_NOEXCEPT
{
return !(e1 < e2);
}
diff --git a/boost/asio/ip/basic_resolver.hpp b/boost/asio/ip/basic_resolver.hpp
index 4979d104cf..b937ce5c10 100644
--- a/boost/asio/ip/basic_resolver.hpp
+++ b/boost/asio/ip/basic_resolver.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -18,41 +18,43 @@
#include <boost/asio/detail/config.hpp>
#include <string>
#include <boost/asio/async_result.hpp>
-#include <boost/asio/basic_io_object.hpp>
#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/io_object_impl.hpp>
+#include <boost/asio/detail/non_const_lvalue.hpp>
#include <boost/asio/detail/string_view.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
+#include <boost/asio/execution_context.hpp>
+#include <boost/asio/executor.hpp>
#include <boost/asio/ip/basic_resolver_iterator.hpp>
#include <boost/asio/ip/basic_resolver_query.hpp>
#include <boost/asio/ip/basic_resolver_results.hpp>
#include <boost/asio/ip/resolver_base.hpp>
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/winrt_resolver_service.hpp>
+#else
+# include <boost/asio/detail/resolver_service.hpp>
+#endif
#if defined(BOOST_ASIO_HAS_MOVE)
# include <utility>
#endif // defined(BOOST_ASIO_HAS_MOVE)
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/ip/resolver_service.hpp>
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_resolver_service.hpp>
-# define BOOST_ASIO_SVC_T \
- boost::asio::detail::winrt_resolver_service<InternetProtocol>
-# else
-# include <boost/asio/detail/resolver_service.hpp>
-# define BOOST_ASIO_SVC_T \
- boost::asio::detail::resolver_service<InternetProtocol>
-# endif
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
namespace ip {
+#if !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+#define BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename InternetProtocol, typename Executor = executor>
+class basic_resolver;
+
+#endif // !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
+
/// Provides endpoint resolution functionality.
/**
* The basic_resolver class template provides the ability to resolve a query
@@ -62,15 +64,13 @@ namespace ip {
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*/
-template <typename InternetProtocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= resolver_service<InternetProtocol>)>
+template <typename InternetProtocol, typename Executor>
class basic_resolver
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>,
- public resolver_base
+ : public resolver_base
{
public:
/// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
+ typedef Executor executor_type;
/// The protocol type.
typedef InternetProtocol protocol_type;
@@ -89,16 +89,33 @@ public:
/// The results type.
typedef basic_resolver_results<InternetProtocol> results_type;
- /// Constructor.
+ /// Construct with executor.
/**
* This constructor creates a basic_resolver.
*
- * @param io_context The io_context object that the resolver will use to
+ * @param ex The I/O executor that the resolver will use, by default, to
* dispatch handlers for any asynchronous operations performed on the
* resolver.
*/
- explicit basic_resolver(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
+ explicit basic_resolver(const executor_type& ex)
+ : impl_(ex)
+ {
+ }
+
+ /// Construct with execution context.
+ /**
+ * This constructor creates a basic_resolver.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the resolver will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the resolver.
+ */
+ template <typename ExecutionContext>
+ explicit basic_resolver(ExecutionContext& context,
+ typename enable_if<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >::type* = 0)
+ : impl_(context)
{
}
@@ -111,10 +128,10 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_resolver(io_context&) constructor.
+ * constructed using the @c basic_resolver(const executor_type&) constructor.
*/
basic_resolver(basic_resolver&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
+ : impl_(std::move(other.impl_))
{
}
@@ -128,11 +145,11 @@ public:
* occur.
*
* @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_resolver(io_context&) constructor.
+ * constructed using the @c basic_resolver(const executor_type&) constructor.
*/
basic_resolver& operator=(basic_resolver&& other)
{
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
+ impl_ = std::move(other.impl_);
return *this;
}
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
@@ -147,45 +164,11 @@ public:
{
}
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- // These functions are provided by basic_io_object<>.
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- boost::asio::io_context& get_io_context()
- {
- return basic_io_object<BOOST_ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- boost::asio::io_context& get_io_service()
- {
- return basic_io_object<BOOST_ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
/// Get the executor associated with the object.
executor_type get_executor() BOOST_ASIO_NOEXCEPT
{
- return basic_io_object<BOOST_ASIO_SVC_T>::get_executor();
+ return impl_.get_executor();
}
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
/// Cancel any asynchronous operations that are waiting on the resolver.
/**
@@ -195,7 +178,7 @@ public:
*/
void cancel()
{
- return this->get_service().cancel(this->get_implementation());
+ return impl_.get_service().cancel(impl_.get_implementation());
}
#if !defined(BOOST_ASIO_NO_DEPRECATED)
@@ -215,8 +198,8 @@ public:
results_type resolve(const query& q)
{
boost::system::error_code ec;
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
+ results_type r = impl_.get_service().resolve(
+ impl_.get_implementation(), q, ec);
boost::asio::detail::throw_error(ec, "resolve");
return r;
}
@@ -236,7 +219,7 @@ public:
*/
results_type resolve(const query& q, boost::system::error_code& ec)
{
- return this->get_service().resolve(this->get_implementation(), q, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), q, ec);
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
@@ -336,7 +319,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @returns A range object representing the list of endpoint entries. A
* successful call to this function is guaranteed to return a non-empty
@@ -361,8 +345,8 @@ public:
boost::system::error_code ec;
basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
+ results_type r = impl_.get_service().resolve(
+ impl_.get_implementation(), q, ec);
boost::asio::detail::throw_error(ec, "resolve");
return r;
}
@@ -385,7 +369,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @param ec Set to indicate what error occurred, if any.
*
@@ -410,7 +395,7 @@ public:
{
basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- return this->get_service().resolve(this->get_implementation(), q, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), q, ec);
}
/// Perform forward resolution of a query to a list of entries.
@@ -519,7 +504,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @returns A range object representing the list of endpoint entries. A
* successful call to this function is guaranteed to return a non-empty
@@ -546,8 +532,8 @@ public:
basic_resolver_query<protocol_type> q(
protocol, static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
+ results_type r = impl_.get_service().resolve(
+ impl_.get_implementation(), q, ec);
boost::asio::detail::throw_error(ec, "resolve");
return r;
}
@@ -573,7 +559,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @param ec Set to indicate what error occurred, if any.
*
@@ -599,7 +586,7 @@ public:
basic_resolver_query<protocol_type> q(
protocol, static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- return this->get_service().resolve(this->get_implementation(), q, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), q, ec);
}
#if !defined(BOOST_ASIO_NO_DEPRECATED)
@@ -619,9 +606,9 @@ public:
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -632,23 +619,9 @@ public:
async_resolve(const query& q,
BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, q);
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
@@ -676,9 +649,9 @@ public:
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -723,7 +696,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @param handler The handler to be called when the resolve operation
* completes. Copies will be made of the handler as required. The function
@@ -733,9 +707,9 @@ public:
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -759,26 +733,12 @@ public:
resolver_base::flags resolve_flags,
BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, q);
}
/// Asynchronously perform forward resolution of a query to a list of entries.
@@ -808,9 +768,9 @@ public:
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -858,7 +818,8 @@ public:
*
* @param resolve_flags A set of flags that determine how name resolution
* should be performed. The default flags are suitable for communication with
- * remote hosts.
+ * remote hosts. See the @ref resolver_base documentation for the set of
+ * available flags.
*
* @param handler The handler to be called when the resolve operation
* completes. Copies will be made of the handler as required. The function
@@ -868,9 +829,9 @@ public:
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -894,27 +855,13 @@ public:
resolver_base::flags resolve_flags,
BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
basic_resolver_query<protocol_type> q(
protocol, static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, q);
}
/// Perform reverse resolution of an endpoint to a list of entries.
@@ -934,8 +881,8 @@ public:
results_type resolve(const endpoint_type& e)
{
boost::system::error_code ec;
- results_type i = this->get_service().resolve(
- this->get_implementation(), e, ec);
+ results_type i = impl_.get_service().resolve(
+ impl_.get_implementation(), e, ec);
boost::asio::detail::throw_error(ec, "resolve");
return i;
}
@@ -956,7 +903,7 @@ public:
*/
results_type resolve(const endpoint_type& e, boost::system::error_code& ec)
{
- return this->get_service().resolve(this->get_implementation(), e, ec);
+ return impl_.get_service().resolve(impl_.get_implementation(), e, ec);
}
/// Asynchronously perform reverse resolution of an endpoint to a list of
@@ -976,9 +923,9 @@ public:
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
+ * not, the handler will not be invoked from within this function. On
+ * immediate completion, invocation of the handler will be performed in a
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -989,24 +936,43 @@ public:
async_resolve(const endpoint_type& e,
BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
+ return boost::asio::async_initiate<ResolveHandler,
+ void (boost::system::error_code, results_type)>(
+ initiate_async_resolve(), handler, this, e);
+ }
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), e,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
+private:
+ // Disallow copying and assignment.
+ basic_resolver(const basic_resolver&) BOOST_ASIO_DELETED;
+ basic_resolver& operator=(const basic_resolver&) BOOST_ASIO_DELETED;
- this->get_service().async_resolve(
- this->get_implementation(), e, init.completion_handler);
+ struct initiate_async_resolve
+ {
+ template <typename ResolveHandler, typename Query>
+ void operator()(BOOST_ASIO_MOVE_ARG(ResolveHandler) handler,
+ basic_resolver* self, const Query& q) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ResolveHandler.
+ BOOST_ASIO_RESOLVE_HANDLER_CHECK(
+ ResolveHandler, handler, results_type) type_check;
+
+ boost::asio::detail::non_const_lvalue<ResolveHandler> handler2(handler);
+ self->impl_.get_service().async_resolve(
+ self->impl_.get_implementation(), q, handler2.value,
+ self->impl_.get_implementation_executor());
+ }
+ };
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
+# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ boost::asio::detail::io_object_impl<
+ boost::asio::detail::winrt_resolver_service<InternetProtocol>,
+ Executor> impl_;
+# else
+ boost::asio::detail::io_object_impl<
+ boost::asio::detail::resolver_service<InternetProtocol>,
+ Executor> impl_;
+# endif
};
} // namespace ip
@@ -1015,8 +981,4 @@ public:
#include <boost/asio/detail/pop_options.hpp>
-#if !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# undef BOOST_ASIO_SVC_T
-#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
#endif // BOOST_ASIO_IP_BASIC_RESOLVER_HPP
diff --git a/boost/asio/ip/basic_resolver_entry.hpp b/boost/asio/ip/basic_resolver_entry.hpp
index efaf976577..c00f17a2aa 100644
--- a/boost/asio/ip/basic_resolver_entry.hpp
+++ b/boost/asio/ip/basic_resolver_entry.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_entry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/basic_resolver_iterator.hpp b/boost/asio/ip/basic_resolver_iterator.hpp
index dd93b84149..5564a78d6f 100644
--- a/boost/asio/ip/basic_resolver_iterator.hpp
+++ b/boost/asio/ip/basic_resolver_iterator.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/basic_resolver_query.hpp b/boost/asio/ip/basic_resolver_query.hpp
index cbbae25ae7..e01597ebee 100644
--- a/boost/asio/ip/basic_resolver_query.hpp
+++ b/boost/asio/ip/basic_resolver_query.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_query.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/basic_resolver_results.hpp b/boost/asio/ip/basic_resolver_results.hpp
index f553930cfc..64d1937c17 100644
--- a/boost/asio/ip/basic_resolver_results.hpp
+++ b/boost/asio/ip/basic_resolver_results.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_results.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/detail/endpoint.hpp b/boost/asio/ip/detail/endpoint.hpp
index a6f04abed9..690e6b1703 100644
--- a/boost/asio/ip/detail/endpoint.hpp
+++ b/boost/asio/ip/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// ip/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -34,42 +34,43 @@ class endpoint
{
public:
// Default constructor.
- BOOST_ASIO_DECL endpoint();
+ BOOST_ASIO_DECL endpoint() BOOST_ASIO_NOEXCEPT;
// Construct an endpoint using a family and port number.
- BOOST_ASIO_DECL endpoint(int family, unsigned short port_num);
+ BOOST_ASIO_DECL endpoint(int family,
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT;
// Construct an endpoint using an address and port number.
BOOST_ASIO_DECL endpoint(const boost::asio::ip::address& addr,
- unsigned short port_num);
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT;
// Copy constructor.
- endpoint(const endpoint& other)
+ endpoint(const endpoint& other) BOOST_ASIO_NOEXCEPT
: data_(other.data_)
{
}
// Assign from another endpoint.
- endpoint& operator=(const endpoint& other)
+ endpoint& operator=(const endpoint& other) BOOST_ASIO_NOEXCEPT
{
data_ = other.data_;
return *this;
}
// Get the underlying endpoint in the native type.
- boost::asio::detail::socket_addr_type* data()
+ boost::asio::detail::socket_addr_type* data() BOOST_ASIO_NOEXCEPT
{
return &data_.base;
}
// Get the underlying endpoint in the native type.
- const boost::asio::detail::socket_addr_type* data() const
+ const boost::asio::detail::socket_addr_type* data() const BOOST_ASIO_NOEXCEPT
{
return &data_.base;
}
// Get the underlying size of the endpoint in the native type.
- std::size_t size() const
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
{
if (is_v4())
return sizeof(boost::asio::detail::sockaddr_in4_type);
@@ -81,33 +82,34 @@ public:
BOOST_ASIO_DECL void resize(std::size_t new_size);
// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
{
return sizeof(data_);
}
// Get the port associated with the endpoint.
- BOOST_ASIO_DECL unsigned short port() const;
+ BOOST_ASIO_DECL unsigned short port() const BOOST_ASIO_NOEXCEPT;
// Set the port associated with the endpoint.
- BOOST_ASIO_DECL void port(unsigned short port_num);
+ BOOST_ASIO_DECL void port(unsigned short port_num) BOOST_ASIO_NOEXCEPT;
// Get the IP address associated with the endpoint.
- BOOST_ASIO_DECL boost::asio::ip::address address() const;
+ BOOST_ASIO_DECL boost::asio::ip::address address() const BOOST_ASIO_NOEXCEPT;
// Set the IP address associated with the endpoint.
- BOOST_ASIO_DECL void address(const boost::asio::ip::address& addr);
+ BOOST_ASIO_DECL void address(
+ const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT;
// Compare two endpoints for equality.
- BOOST_ASIO_DECL friend bool operator==(
- const endpoint& e1, const endpoint& e2);
+ BOOST_ASIO_DECL friend bool operator==(const endpoint& e1,
+ const endpoint& e2) BOOST_ASIO_NOEXCEPT;
// Compare endpoints for ordering.
- BOOST_ASIO_DECL friend bool operator<(
- const endpoint& e1, const endpoint& e2);
+ BOOST_ASIO_DECL friend bool operator<(const endpoint& e1,
+ const endpoint& e2) BOOST_ASIO_NOEXCEPT;
// Determine whether the endpoint is IPv4.
- bool is_v4() const
+ bool is_v4() const BOOST_ASIO_NOEXCEPT
{
return data_.base.sa_family == BOOST_ASIO_OS_DEF(AF_INET);
}
diff --git a/boost/asio/ip/detail/impl/endpoint.ipp b/boost/asio/ip/detail/impl/endpoint.ipp
index 49f5af116f..9297429999 100644
--- a/boost/asio/ip/detail/impl/endpoint.ipp
+++ b/boost/asio/ip/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// ip/detail/impl/endpoint.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -32,7 +32,7 @@ namespace asio {
namespace ip {
namespace detail {
-endpoint::endpoint()
+endpoint::endpoint() BOOST_ASIO_NOEXCEPT
: data_()
{
data_.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
@@ -40,7 +40,7 @@ endpoint::endpoint()
data_.v4.sin_addr.s_addr = BOOST_ASIO_OS_DEF(INADDR_ANY);
}
-endpoint::endpoint(int family, unsigned short port_num)
+endpoint::endpoint(int family, unsigned short port_num) BOOST_ASIO_NOEXCEPT
: data_()
{
using namespace std; // For memcpy.
@@ -70,7 +70,7 @@ endpoint::endpoint(int family, unsigned short port_num)
}
endpoint::endpoint(const boost::asio::ip::address& addr,
- unsigned short port_num)
+ unsigned short port_num) BOOST_ASIO_NOEXCEPT
: data_()
{
using namespace std; // For memcpy.
@@ -107,7 +107,7 @@ void endpoint::resize(std::size_t new_size)
}
}
-unsigned short endpoint::port() const
+unsigned short endpoint::port() const BOOST_ASIO_NOEXCEPT
{
if (is_v4())
{
@@ -121,7 +121,7 @@ unsigned short endpoint::port() const
}
}
-void endpoint::port(unsigned short port_num)
+void endpoint::port(unsigned short port_num) BOOST_ASIO_NOEXCEPT
{
if (is_v4())
{
@@ -135,7 +135,7 @@ void endpoint::port(unsigned short port_num)
}
}
-boost::asio::ip::address endpoint::address() const
+boost::asio::ip::address endpoint::address() const BOOST_ASIO_NOEXCEPT
{
using namespace std; // For memcpy.
if (is_v4())
@@ -156,18 +156,18 @@ boost::asio::ip::address endpoint::address() const
}
}
-void endpoint::address(const boost::asio::ip::address& addr)
+void endpoint::address(const boost::asio::ip::address& addr) BOOST_ASIO_NOEXCEPT
{
endpoint tmp_endpoint(addr, port());
data_ = tmp_endpoint.data_;
}
-bool operator==(const endpoint& e1, const endpoint& e2)
+bool operator==(const endpoint& e1, const endpoint& e2) BOOST_ASIO_NOEXCEPT
{
return e1.address() == e2.address() && e1.port() == e2.port();
}
-bool operator<(const endpoint& e1, const endpoint& e2)
+bool operator<(const endpoint& e1, const endpoint& e2) BOOST_ASIO_NOEXCEPT
{
if (e1.address() < e2.address())
return true;
diff --git a/boost/asio/ip/detail/socket_option.hpp b/boost/asio/ip/detail/socket_option.hpp
index ec3ca7e970..7f8b3f586f 100644
--- a/boost/asio/ip/detail/socket_option.hpp
+++ b/boost/asio/ip/detail/socket_option.hpp
@@ -2,7 +2,7 @@
// detail/socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/host_name.hpp b/boost/asio/ip/host_name.hpp
index c1e4e0cf8b..bb893ef24b 100644
--- a/boost/asio/ip/host_name.hpp
+++ b/boost/asio/ip/host_name.hpp
@@ -2,7 +2,7 @@
// ip/host_name.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/icmp.hpp b/boost/asio/ip/icmp.hpp
index 4b9d642048..229529f770 100644
--- a/boost/asio/ip/icmp.hpp
+++ b/boost/asio/ip/icmp.hpp
@@ -2,7 +2,7 @@
// ip/icmp.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/impl/address.hpp b/boost/asio/ip/impl/address.hpp
index cf5afb4fcf..63f6b2e0ac 100644
--- a/boost/asio/ip/impl/address.hpp
+++ b/boost/asio/ip/impl/address.hpp
@@ -2,7 +2,7 @@
// ip/impl/address.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/impl/address.ipp b/boost/asio/ip/impl/address.ipp
index 9afa566a35..2dc55290b0 100644
--- a/boost/asio/ip/impl/address.ipp
+++ b/boost/asio/ip/impl/address.ipp
@@ -2,7 +2,7 @@
// ip/impl/address.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -30,28 +30,30 @@ namespace boost {
namespace asio {
namespace ip {
-address::address()
+address::address() BOOST_ASIO_NOEXCEPT
: type_(ipv4),
ipv4_address_(),
ipv6_address_()
{
}
-address::address(const boost::asio::ip::address_v4& ipv4_address)
+address::address(
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT
: type_(ipv4),
ipv4_address_(ipv4_address),
ipv6_address_()
{
}
-address::address(const boost::asio::ip::address_v6& ipv6_address)
+address::address(
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT
: type_(ipv6),
ipv4_address_(),
ipv6_address_(ipv6_address)
{
}
-address::address(const address& other)
+address::address(const address& other) BOOST_ASIO_NOEXCEPT
: type_(other.type_),
ipv4_address_(other.ipv4_address_),
ipv6_address_(other.ipv6_address_)
@@ -59,7 +61,7 @@ address::address(const address& other)
}
#if defined(BOOST_ASIO_HAS_MOVE)
-address::address(address&& other)
+address::address(address&& other) BOOST_ASIO_NOEXCEPT
: type_(other.type_),
ipv4_address_(other.ipv4_address_),
ipv6_address_(other.ipv6_address_)
@@ -67,7 +69,7 @@ address::address(address&& other)
}
#endif // defined(BOOST_ASIO_HAS_MOVE)
-address& address::operator=(const address& other)
+address& address::operator=(const address& other) BOOST_ASIO_NOEXCEPT
{
type_ = other.type_;
ipv4_address_ = other.ipv4_address_;
@@ -76,7 +78,7 @@ address& address::operator=(const address& other)
}
#if defined(BOOST_ASIO_HAS_MOVE)
-address& address::operator=(address&& other)
+address& address::operator=(address&& other) BOOST_ASIO_NOEXCEPT
{
type_ = other.type_;
ipv4_address_ = other.ipv4_address_;
@@ -85,7 +87,8 @@ address& address::operator=(address&& other)
}
#endif // defined(BOOST_ASIO_HAS_MOVE)
-address& address::operator=(const boost::asio::ip::address_v4& ipv4_address)
+address& address::operator=(
+ const boost::asio::ip::address_v4& ipv4_address) BOOST_ASIO_NOEXCEPT
{
type_ = ipv4;
ipv4_address_ = ipv4_address;
@@ -93,7 +96,8 @@ address& address::operator=(const boost::asio::ip::address_v4& ipv4_address)
return *this;
}
-address& address::operator=(const boost::asio::ip::address_v6& ipv6_address)
+address& address::operator=(
+ const boost::asio::ip::address_v6& ipv6_address) BOOST_ASIO_NOEXCEPT
{
type_ = ipv6;
ipv4_address_ = boost::asio::ip::address_v4();
@@ -109,7 +113,8 @@ address make_address(const char* str)
return addr;
}
-address make_address(const char* str, boost::system::error_code& ec)
+address make_address(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
boost::asio::ip::address_v6 ipv6_address =
boost::asio::ip::make_address_v6(str, ec);
@@ -130,7 +135,7 @@ address make_address(const std::string& str)
}
address make_address(const std::string& str,
- boost::system::error_code& ec)
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
return make_address(str.c_str(), ec);
}
@@ -143,7 +148,7 @@ address make_address(string_view str)
}
address make_address(string_view str,
- boost::system::error_code& ec)
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
return make_address(static_cast<std::string>(str), ec);
}
@@ -186,28 +191,28 @@ std::string address::to_string(boost::system::error_code& ec) const
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-bool address::is_loopback() const
+bool address::is_loopback() const BOOST_ASIO_NOEXCEPT
{
return (type_ == ipv4)
? ipv4_address_.is_loopback()
: ipv6_address_.is_loopback();
}
-bool address::is_unspecified() const
+bool address::is_unspecified() const BOOST_ASIO_NOEXCEPT
{
return (type_ == ipv4)
? ipv4_address_.is_unspecified()
: ipv6_address_.is_unspecified();
}
-bool address::is_multicast() const
+bool address::is_multicast() const BOOST_ASIO_NOEXCEPT
{
return (type_ == ipv4)
? ipv4_address_.is_multicast()
: ipv6_address_.is_multicast();
}
-bool operator==(const address& a1, const address& a2)
+bool operator==(const address& a1, const address& a2) BOOST_ASIO_NOEXCEPT
{
if (a1.type_ != a2.type_)
return false;
@@ -216,7 +221,7 @@ bool operator==(const address& a1, const address& a2)
return a1.ipv4_address_ == a2.ipv4_address_;
}
-bool operator<(const address& a1, const address& a2)
+bool operator<(const address& a1, const address& a2) BOOST_ASIO_NOEXCEPT
{
if (a1.type_ < a2.type_)
return true;
diff --git a/boost/asio/ip/impl/address_v4.hpp b/boost/asio/ip/impl/address_v4.hpp
index 838dc613e2..98bd89d89f 100644
--- a/boost/asio/ip/impl/address_v4.hpp
+++ b/boost/asio/ip/impl/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/impl/address_v4.ipp b/boost/asio/ip/impl/address_v4.ipp
index 7693deaf40..c572100a8b 100644
--- a/boost/asio/ip/impl/address_v4.ipp
+++ b/boost/asio/ip/impl/address_v4.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -58,7 +58,7 @@ address_v4::address_v4(address_v4::uint_type addr)
static_cast<boost::asio::detail::u_long_type>(addr));
}
-address_v4::bytes_type address_v4::to_bytes() const
+address_v4::bytes_type address_v4::to_bytes() const BOOST_ASIO_NOEXCEPT
{
using namespace std; // For memcpy.
bytes_type bytes;
@@ -70,7 +70,7 @@ address_v4::bytes_type address_v4::to_bytes() const
return bytes;
}
-address_v4::uint_type address_v4::to_uint() const
+address_v4::uint_type address_v4::to_uint() const BOOST_ASIO_NOEXCEPT
{
return boost::asio::detail::socket_ops::network_to_host_long(addr_.s_addr);
}
@@ -109,12 +109,12 @@ std::string address_v4::to_string(boost::system::error_code& ec) const
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-bool address_v4::is_loopback() const
+bool address_v4::is_loopback() const BOOST_ASIO_NOEXCEPT
{
return (to_uint() & 0xFF000000) == 0x7F000000;
}
-bool address_v4::is_unspecified() const
+bool address_v4::is_unspecified() const BOOST_ASIO_NOEXCEPT
{
return to_uint() == 0;
}
@@ -136,7 +136,7 @@ bool address_v4::is_class_c() const
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-bool address_v4::is_multicast() const
+bool address_v4::is_multicast() const BOOST_ASIO_NOEXCEPT
{
return (to_uint() & 0xF0000000) == 0xE0000000;
}
@@ -167,8 +167,8 @@ address_v4 make_address_v4(const char* str)
return addr;
}
-address_v4 make_address_v4(
- const char* str, boost::system::error_code& ec)
+address_v4 make_address_v4(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
address_v4::bytes_type bytes;
if (boost::asio::detail::socket_ops::inet_pton(
@@ -182,8 +182,8 @@ address_v4 make_address_v4(const std::string& str)
return make_address_v4(str.c_str());
}
-address_v4 make_address_v4(
- const std::string& str, boost::system::error_code& ec)
+address_v4 make_address_v4(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
return make_address_v4(str.c_str(), ec);
}
@@ -196,7 +196,7 @@ address_v4 make_address_v4(string_view str)
}
address_v4 make_address_v4(string_view str,
- boost::system::error_code& ec)
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
return make_address_v4(static_cast<std::string>(str), ec);
}
diff --git a/boost/asio/ip/impl/address_v6.hpp b/boost/asio/ip/impl/address_v6.hpp
index f989b6a702..ebfd467e0f 100644
--- a/boost/asio/ip/impl/address_v6.hpp
+++ b/boost/asio/ip/impl/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/impl/address_v6.ipp b/boost/asio/ip/impl/address_v6.ipp
index 4eea4bc5a0..7ea2f24e1f 100644
--- a/boost/asio/ip/impl/address_v6.ipp
+++ b/boost/asio/ip/impl/address_v6.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -32,7 +32,7 @@ namespace boost {
namespace asio {
namespace ip {
-address_v6::address_v6()
+address_v6::address_v6() BOOST_ASIO_NOEXCEPT
: addr_(),
scope_id_(0)
{
@@ -57,21 +57,21 @@ address_v6::address_v6(const address_v6::bytes_type& bytes,
memcpy(addr_.s6_addr, bytes.data(), 16);
}
-address_v6::address_v6(const address_v6& other)
+address_v6::address_v6(const address_v6& other) BOOST_ASIO_NOEXCEPT
: addr_(other.addr_),
scope_id_(other.scope_id_)
{
}
#if defined(BOOST_ASIO_HAS_MOVE)
-address_v6::address_v6(address_v6&& other)
+address_v6::address_v6(address_v6&& other) BOOST_ASIO_NOEXCEPT
: addr_(other.addr_),
scope_id_(other.scope_id_)
{
}
#endif // defined(BOOST_ASIO_HAS_MOVE)
-address_v6& address_v6::operator=(const address_v6& other)
+address_v6& address_v6::operator=(const address_v6& other) BOOST_ASIO_NOEXCEPT
{
addr_ = other.addr_;
scope_id_ = other.scope_id_;
@@ -79,7 +79,7 @@ address_v6& address_v6::operator=(const address_v6& other)
}
#if defined(BOOST_ASIO_HAS_MOVE)
-address_v6& address_v6::operator=(address_v6&& other)
+address_v6& address_v6::operator=(address_v6&& other) BOOST_ASIO_NOEXCEPT
{
addr_ = other.addr_;
scope_id_ = other.scope_id_;
@@ -87,7 +87,7 @@ address_v6& address_v6::operator=(address_v6&& other)
}
#endif // defined(BOOST_ASIO_HAS_MOVE)
-address_v6::bytes_type address_v6::to_bytes() const
+address_v6::bytes_type address_v6::to_bytes() const BOOST_ASIO_NOEXCEPT
{
using namespace std; // For memcpy.
bytes_type bytes;
@@ -139,7 +139,7 @@ address_v4 address_v6::to_v4() const
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-bool address_v6::is_loopback() const
+bool address_v6::is_loopback() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -151,7 +151,7 @@ bool address_v6::is_loopback() const
&& (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 1));
}
-bool address_v6::is_unspecified() const
+bool address_v6::is_unspecified() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -163,17 +163,17 @@ bool address_v6::is_unspecified() const
&& (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 0));
}
-bool address_v6::is_link_local() const
+bool address_v6::is_link_local() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0x80));
}
-bool address_v6::is_site_local() const
+bool address_v6::is_site_local() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0xc0));
}
-bool address_v6::is_v4_mapped() const
+bool address_v6::is_v4_mapped() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -199,37 +199,37 @@ bool address_v6::is_v4_compatible() const
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-bool address_v6::is_multicast() const
+bool address_v6::is_multicast() const BOOST_ASIO_NOEXCEPT
{
return (addr_.s6_addr[0] == 0xff);
}
-bool address_v6::is_multicast_global() const
+bool address_v6::is_multicast_global() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x0e));
}
-bool address_v6::is_multicast_link_local() const
+bool address_v6::is_multicast_link_local() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x02));
}
-bool address_v6::is_multicast_node_local() const
+bool address_v6::is_multicast_node_local() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x01));
}
-bool address_v6::is_multicast_org_local() const
+bool address_v6::is_multicast_org_local() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x08));
}
-bool address_v6::is_multicast_site_local() const
+bool address_v6::is_multicast_site_local() const BOOST_ASIO_NOEXCEPT
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x05));
}
-bool operator==(const address_v6& a1, const address_v6& a2)
+bool operator==(const address_v6& a1, const address_v6& a2) BOOST_ASIO_NOEXCEPT
{
using namespace std; // For memcmp.
return memcmp(&a1.addr_, &a2.addr_,
@@ -237,7 +237,7 @@ bool operator==(const address_v6& a1, const address_v6& a2)
&& a1.scope_id_ == a2.scope_id_;
}
-bool operator<(const address_v6& a1, const address_v6& a2)
+bool operator<(const address_v6& a1, const address_v6& a2) BOOST_ASIO_NOEXCEPT
{
using namespace std; // For memcmp.
int memcmp_result = memcmp(&a1.addr_, &a2.addr_,
@@ -249,7 +249,7 @@ bool operator<(const address_v6& a1, const address_v6& a2)
return a1.scope_id_ < a2.scope_id_;
}
-address_v6 address_v6::loopback()
+address_v6 address_v6::loopback() BOOST_ASIO_NOEXCEPT
{
address_v6 tmp;
tmp.addr_.s6_addr[15] = 1;
@@ -282,8 +282,8 @@ address_v6 make_address_v6(const char* str)
return addr;
}
-address_v6 make_address_v6(
- const char* str, boost::system::error_code& ec)
+address_v6 make_address_v6(const char* str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
address_v6::bytes_type bytes;
unsigned long scope_id = 0;
@@ -298,8 +298,8 @@ address_v6 make_address_v6(const std::string& str)
return make_address_v6(str.c_str());
}
-address_v6 make_address_v6(
- const std::string& str, boost::system::error_code& ec)
+address_v6 make_address_v6(const std::string& str,
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
return make_address_v6(str.c_str(), ec);
}
@@ -312,7 +312,7 @@ address_v6 make_address_v6(string_view str)
}
address_v6 make_address_v6(string_view str,
- boost::system::error_code& ec)
+ boost::system::error_code& ec) BOOST_ASIO_NOEXCEPT
{
return make_address_v6(static_cast<std::string>(str), ec);
}
diff --git a/boost/asio/ip/impl/basic_endpoint.hpp b/boost/asio/ip/impl/basic_endpoint.hpp
index 23655bf940..5eba925242 100644
--- a/boost/asio/ip/impl/basic_endpoint.hpp
+++ b/boost/asio/ip/impl/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/impl/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/impl/host_name.ipp b/boost/asio/ip/impl/host_name.ipp
index 17b8395a76..565e5459a3 100644
--- a/boost/asio/ip/impl/host_name.ipp
+++ b/boost/asio/ip/impl/host_name.ipp
@@ -2,7 +2,7 @@
// ip/impl/host_name.ipp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/impl/network_v4.hpp b/boost/asio/ip/impl/network_v4.hpp
index 3ca4e746bd..e20a6fefc9 100644
--- a/boost/asio/ip/impl/network_v4.hpp
+++ b/boost/asio/ip/impl/network_v4.hpp
@@ -2,7 +2,7 @@
// ip/impl/network_v4.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/ip/impl/network_v4.ipp b/boost/asio/ip/impl/network_v4.ipp
index 62f742c669..d443475183 100644
--- a/boost/asio/ip/impl/network_v4.ipp
+++ b/boost/asio/ip/impl/network_v4.ipp
@@ -2,7 +2,7 @@
// ip/impl/network_v4.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/ip/impl/network_v6.hpp b/boost/asio/ip/impl/network_v6.hpp
index 1b13879ea3..6be5ab533f 100644
--- a/boost/asio/ip/impl/network_v6.hpp
+++ b/boost/asio/ip/impl/network_v6.hpp
@@ -2,7 +2,7 @@
// ip/impl/network_v6.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/impl/network_v6.ipp b/boost/asio/ip/impl/network_v6.ipp
index 426bc33b39..cbdb974489 100644
--- a/boost/asio/ip/impl/network_v6.ipp
+++ b/boost/asio/ip/impl/network_v6.ipp
@@ -2,7 +2,7 @@
// ip/impl/network_v6.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/ip/multicast.hpp b/boost/asio/ip/multicast.hpp
index d46692c268..d863284192 100644
--- a/boost/asio/ip/multicast.hpp
+++ b/boost/asio/ip/multicast.hpp
@@ -2,7 +2,7 @@
// ip/multicast.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -33,7 +33,7 @@ namespace multicast {
* @par Examples
* Setting the option to join a multicast group:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::address multicast_address =
* boost::asio::ip::address::from_string("225.0.0.1");
@@ -61,7 +61,7 @@ typedef boost::asio::ip::detail::socket_option::multicast_request<
* @par Examples
* Setting the option to leave a multicast group:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::address multicast_address =
* boost::asio::ip::address::from_string("225.0.0.1");
@@ -89,7 +89,7 @@ typedef boost::asio::ip::detail::socket_option::multicast_request<
* @par Examples
* Setting the option:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::address_v4 local_interface =
* boost::asio::ip::address_v4::from_string("1.2.3.4");
@@ -117,7 +117,7 @@ typedef boost::asio::ip::detail::socket_option::network_interface<
* @par Examples
* Setting the option:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::multicast::hops option(4);
* socket.set_option(option);
@@ -126,7 +126,7 @@ typedef boost::asio::ip::detail::socket_option::network_interface<
* @par
* Getting the current option value:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::multicast::hops option;
* socket.get_option(option);
@@ -154,7 +154,7 @@ typedef boost::asio::ip::detail::socket_option::multicast_hops<
* @par Examples
* Setting the option:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::multicast::enable_loopback option(true);
* socket.set_option(option);
@@ -163,7 +163,7 @@ typedef boost::asio::ip::detail::socket_option::multicast_hops<
* @par
* Getting the current option value:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::multicast::enable_loopback option;
* socket.get_option(option);
diff --git a/boost/asio/ip/network_v4.hpp b/boost/asio/ip/network_v4.hpp
index 24e67b8371..25cbbce69f 100644
--- a/boost/asio/ip/network_v4.hpp
+++ b/boost/asio/ip/network_v4.hpp
@@ -2,7 +2,7 @@
// ip/network_v4.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/ip/network_v6.hpp b/boost/asio/ip/network_v6.hpp
index 5fe96743df..dce950870b 100644
--- a/boost/asio/ip/network_v6.hpp
+++ b/boost/asio/ip/network_v6.hpp
@@ -2,7 +2,7 @@
// ip/network_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/ip/resolver_base.hpp b/boost/asio/ip/resolver_base.hpp
index 06cbcd0220..a61565fdc1 100644
--- a/boost/asio/ip/resolver_base.hpp
+++ b/boost/asio/ip/resolver_base.hpp
@@ -2,7 +2,7 @@
// ip/resolver_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/resolver_query_base.hpp b/boost/asio/ip/resolver_query_base.hpp
index 1e287c6225..9e0a0321a5 100644
--- a/boost/asio/ip/resolver_query_base.hpp
+++ b/boost/asio/ip/resolver_query_base.hpp
@@ -2,7 +2,7 @@
// ip/resolver_query_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/resolver_service.hpp b/boost/asio/ip/resolver_service.hpp
deleted file mode 100644
index 3e1fd38a70..0000000000
--- a/boost/asio/ip/resolver_service.hpp
+++ /dev/null
@@ -1,202 +0,0 @@
-//
-// ip/resolver_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 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)
-//
-
-#ifndef BOOST_ASIO_IP_RESOLVER_SERVICE_HPP
-#define BOOST_ASIO_IP_RESOLVER_SERVICE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/async_result.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-#include <boost/asio/ip/basic_resolver_results.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_resolver_service.hpp>
-#else
-# include <boost/asio/detail/resolver_service.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Default service implementation for a resolver.
-template <typename InternetProtocol>
-class resolver_service
-#if defined(GENERATING_DOCUMENTATION)
- : public boost::asio::io_context::service
-#else
- : public boost::asio::detail::service_base<
- resolver_service<InternetProtocol> >
-#endif
-{
-public:
-#if defined(GENERATING_DOCUMENTATION)
- /// The unique service identifier.
- static boost::asio::io_context::id id;
-#endif
-
- /// The protocol type.
- typedef InternetProtocol protocol_type;
-
- /// The endpoint type.
- typedef typename InternetProtocol::endpoint endpoint_type;
-
- /// The query type.
- typedef basic_resolver_query<InternetProtocol> query_type;
-
- /// The iterator type.
- typedef basic_resolver_iterator<InternetProtocol> iterator_type;
-
- /// The results type.
- typedef basic_resolver_results<InternetProtocol> results_type;
-
-private:
- // The type of the platform-specific implementation.
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- typedef boost::asio::detail::winrt_resolver_service<InternetProtocol>
- service_impl_type;
-#else
- typedef boost::asio::detail::resolver_service<InternetProtocol>
- service_impl_type;
-#endif
-
-public:
- /// The type of a resolver implementation.
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined implementation_type;
-#else
- typedef typename service_impl_type::implementation_type implementation_type;
-#endif
-
- /// Construct a new resolver service for the specified io_context.
- explicit resolver_service(boost::asio::io_context& io_context)
- : boost::asio::detail::service_base<
- resolver_service<InternetProtocol> >(io_context),
- service_impl_(io_context)
- {
- }
-
- /// Construct a new resolver implementation.
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a new resolver implementation.
- void move_construct(implementation_type& impl,
- implementation_type& other_impl)
- {
- service_impl_.move_construct(impl, other_impl);
- }
-
- /// Move-assign from another resolver implementation.
- void move_assign(implementation_type& impl,
- resolver_service& other_service,
- implementation_type& other_impl)
- {
- service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroy a resolver implementation.
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Cancel pending asynchronous operations.
- void cancel(implementation_type& impl)
- {
- service_impl_.cancel(impl);
- }
-
- /// Resolve a query to a list of entries.
- results_type resolve(implementation_type& impl, const query_type& query,
- boost::system::error_code& ec)
- {
- return service_impl_.resolve(impl, query, ec);
- }
-
- /// Asynchronously resolve a query to a list of entries.
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(implementation_type& impl, const query_type& query,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- service_impl_.async_resolve(impl, query, init.completion_handler);
-
- return init.result.get();
- }
-
- /// Resolve an endpoint to a list of entries.
- results_type resolve(implementation_type& impl,
- const endpoint_type& endpoint, boost::system::error_code& ec)
- {
- return service_impl_.resolve(impl, endpoint, ec);
- }
-
- /// Asynchronously resolve an endpoint to a list of entries.
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(implementation_type& impl, const endpoint_type& endpoint,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- service_impl_.async_resolve(impl, endpoint, init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- // Destroy all user-defined handler objects owned by the service.
- void shutdown()
- {
- service_impl_.shutdown();
- }
-
- // Perform any fork-related housekeeping.
- void notify_fork(boost::asio::io_context::fork_event event)
- {
- service_impl_.notify_fork(event);
- }
-
- // The platform-specific implementation.
- service_impl_type service_impl_;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_IP_RESOLVER_SERVICE_HPP
diff --git a/boost/asio/ip/tcp.hpp b/boost/asio/ip/tcp.hpp
index dce1c8ee6a..d37b012b3c 100644
--- a/boost/asio/ip/tcp.hpp
+++ b/boost/asio/ip/tcp.hpp
@@ -2,7 +2,7 @@
// ip/tcp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -100,7 +100,7 @@ public:
* @par Examples
* Setting the option:
* @code
- * boost::asio::ip::tcp::socket socket(io_context);
+ * boost::asio::ip::tcp::socket socket(my_context);
* ...
* boost::asio::ip::tcp::no_delay option(true);
* socket.set_option(option);
@@ -109,7 +109,7 @@ public:
* @par
* Getting the current option value:
* @code
- * boost::asio::ip::tcp::socket socket(io_context);
+ * boost::asio::ip::tcp::socket socket(my_context);
* ...
* boost::asio::ip::tcp::no_delay option;
* socket.get_option(option);
diff --git a/boost/asio/ip/udp.hpp b/boost/asio/ip/udp.hpp
index 9f07a55e7e..8ba20b4e62 100644
--- a/boost/asio/ip/udp.hpp
+++ b/boost/asio/ip/udp.hpp
@@ -2,7 +2,7 @@
// ip/udp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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/boost/asio/ip/unicast.hpp b/boost/asio/ip/unicast.hpp
index 793c5f7eb4..2cfcc59601 100644
--- a/boost/asio/ip/unicast.hpp
+++ b/boost/asio/ip/unicast.hpp
@@ -2,7 +2,7 @@
// ip/unicast.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -33,7 +33,7 @@ namespace unicast {
* @par Examples
* Setting the option:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::unicast::hops option(4);
* socket.set_option(option);
@@ -42,7 +42,7 @@ namespace unicast {
* @par
* Getting the current option value:
* @code
- * boost::asio::ip::udp::socket socket(io_context);
+ * boost::asio::ip::udp::socket socket(my_context);
* ...
* boost::asio::ip::unicast::hops option;
* socket.get_option(option);
diff --git a/boost/asio/ip/v6_only.hpp b/boost/asio/ip/v6_only.hpp
index c2f34acc11..54f4706430 100644
--- a/boost/asio/ip/v6_only.hpp
+++ b/boost/asio/ip/v6_only.hpp
@@ -2,7 +2,7 @@
// ip/v6_only.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 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)
@@ -32,7 +32,7 @@ namespace ip {
* @par Examples
* Setting the option:
* @code
- * boost::asio::ip::tcp::socket socket(io_context);
+ * boost::asio::ip::tcp::socket socket(my_context);
* ...
* boost::asio::ip::v6_only option(true);
* socket.set_option(option);
@@ -41,7 +41,7 @@ namespace ip {
* @par
* Getting the current option value:
* @code
- * boost::asio::ip::tcp::socket socket(io_context);
+ * boost::asio::ip::tcp::socket socket(my_context);
* ...
* boost::asio::ip::v6_only option;
* socket.get_option(option);