summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/asio/connect.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/asio/connect.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/connect.hpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/asio/connect.hpp b/3rdParty/Boost/src/boost/asio/connect.hpp
index e54ea08..03c9fe7 100644
--- a/3rdParty/Boost/src/boost/asio/connect.hpp
+++ b/3rdParty/Boost/src/boost/asio/connect.hpp
@@ -1,53 +1,54 @@
//
// connect.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 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_CONNECT_HPP
#define BOOST_ASIO_CONNECT_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
+#include <boost/asio/async_result.hpp>
#include <boost/asio/basic_socket.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
/**
* @defgroup connect boost::asio::connect
*
* @brief Establishes a socket connection by trying each endpoint in a sequence.
*/
/*@{*/
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c connect member
* function, once for each endpoint in the sequence, until a connection is
* successfully established.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param begin An iterator pointing to the start of a sequence of endpoints.
*
* @returns On success, an iterator denoting the successfully connected
* endpoint. Otherwise, the end iterator.
*
* @throws boost::system::system_error Thrown on failure. If the sequence is
* empty, the associated @c error_code is boost::asio::error::not_found.
* Otherwise, contains the error from the last connection attempt.
*
* @note This overload assumes that a default constructed object of type @c
@@ -484,140 +485,144 @@ Iterator connect(basic_socket<Protocol, SocketService>& s,
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
*
* @par Example
* @code tcp::resolver r(io_service);
* tcp::resolver::query q("host", "service");
* tcp::socket s(io_service);
*
* // ...
*
* r.async_resolve(q, resolve_handler);
*
* // ...
*
* void resolve_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* if (!ec)
* {
* boost::asio::async_connect(s, i, connect_handler);
* }
* }
*
* // ...
*
* void connect_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* // ...
* } @endcode
*/
template <typename Protocol, typename SocketService,
typename Iterator, typename ComposedConnectHandler>
-void async_connect(basic_socket<Protocol, SocketService>& s,
+BOOST_ASIO_INITFN_RESULT_TYPE(ComposedConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, SocketService>& s,
Iterator begin, BOOST_ASIO_MOVE_ARG(ComposedConnectHandler) handler);
/// Asynchronously establishes a socket connection by trying each endpoint in a
/// sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
* is successfully established.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param begin An iterator pointing to the start of a sequence of endpoints.
*
* @param end An iterator pointing to the end of a sequence of endpoints.
*
* @param handler The handler to be called when the connect operation
* completes. Copies will be made of the handler as required. The function
* signature of the handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // boost::asio::error::not_found. Otherwise, contains the
* // error from the last connection attempt.
* const boost::system::error_code& error,
*
* // On success, an iterator denoting the successfully
* // connected endpoint. Otherwise, the end iterator.
* Iterator iterator
* ); @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_service::post().
*
* @par Example
* @code tcp::resolver r(io_service);
* tcp::resolver::query q("host", "service");
* tcp::socket s(io_service);
*
* // ...
*
* r.async_resolve(q, resolve_handler);
*
* // ...
*
* void resolve_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* if (!ec)
* {
* tcp::resolver::iterator end;
* boost::asio::async_connect(s, i, end, connect_handler);
* }
* }
*
* // ...
*
* void connect_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* // ...
* } @endcode
*/
template <typename Protocol, typename SocketService,
typename Iterator, typename ComposedConnectHandler>
-void async_connect(basic_socket<Protocol, SocketService>& s,
+BOOST_ASIO_INITFN_RESULT_TYPE(ComposedConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, SocketService>& s,
Iterator begin, Iterator end,
BOOST_ASIO_MOVE_ARG(ComposedConnectHandler) handler);
/// Asynchronously establishes a socket connection by trying each endpoint in a
/// sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
* is successfully established.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param begin An iterator pointing to the start of a sequence of endpoints.
*
* @param connect_condition A function object that is called prior to each
* connection attempt. The signature of the function object must be:
* @code Iterator connect_condition(
* const boost::system::error_code& ec,
* Iterator next); @endcode
* The @c ec parameter contains the result from the most recent connect
* operation. Before the first connection attempt, @c ec is always set to
* indicate success. The @c next parameter is an iterator pointing to the next
* endpoint to be tried. The function object should return the next iterator,
* but is permitted to return a different iterator so that endpoints may be
* skipped. The implementation guarantees that the function object will never
* be called with the end iterator.
*
* @param handler The handler to be called when the connect operation
* completes. Copies will be made of the handler as required. The function
* signature of the handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // boost::asio::error::not_found. Otherwise, contains the
@@ -661,71 +666,73 @@ void async_connect(basic_socket<Protocol, SocketService>& s,
*
* r.async_resolve(q, resolve_handler);
*
* // ...
*
* void resolve_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* if (!ec)
* {
* boost::asio::async_connect(s, i,
* my_connect_condition(),
* connect_handler);
* }
* }
*
* // ...
*
* void connect_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* if (ec)
* {
* // An error occurred.
* }
* else
* {
* std::cout << "Connected to: " << i->endpoint() << std::endl;
* }
* } @endcode
*/
template <typename Protocol, typename SocketService, typename Iterator,
typename ConnectCondition, typename ComposedConnectHandler>
-void async_connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
+BOOST_ASIO_INITFN_RESULT_TYPE(ComposedConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
ConnectCondition connect_condition,
BOOST_ASIO_MOVE_ARG(ComposedConnectHandler) handler);
/// Asynchronously establishes a socket connection by trying each endpoint in a
/// sequence.
/**
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
* is successfully established.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param begin An iterator pointing to the start of a sequence of endpoints.
*
* @param end An iterator pointing to the end of a sequence of endpoints.
*
* @param connect_condition A function object that is called prior to each
* connection attempt. The signature of the function object must be:
* @code Iterator connect_condition(
* const boost::system::error_code& ec,
* Iterator next); @endcode
* The @c ec parameter contains the result from the most recent connect
* operation. Before the first connection attempt, @c ec is always set to
* indicate success. The @c next parameter is an iterator pointing to the next
* endpoint to be tried. The function object should return the next iterator,
* but is permitted to return a different iterator so that endpoints may be
* skipped. The implementation guarantees that the function object will never
* be called with the end iterator.
*
* @param handler The handler to be called when the connect operation
* completes. Copies will be made of the handler as required. The function
* signature of the handler must be:
* @code void handler(
@@ -768,49 +775,51 @@ void async_connect(basic_socket<Protocol, SocketService>& s, Iterator begin,
* r.async_resolve(q, resolve_handler);
*
* // ...
*
* void resolve_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* if (!ec)
* {
* tcp::resolver::iterator end;
* boost::asio::async_connect(s, i, end,
* my_connect_condition(),
* connect_handler);
* }
* }
*
* // ...
*
* void connect_handler(
* const boost::system::error_code& ec,
* tcp::resolver::iterator i)
* {
* if (ec)
* {
* // An error occurred.
* }
* else
* {
* std::cout << "Connected to: " << i->endpoint() << std::endl;
* }
* } @endcode
*/
template <typename Protocol, typename SocketService, typename Iterator,
typename ConnectCondition, typename ComposedConnectHandler>
-void async_connect(basic_socket<Protocol, SocketService>& s,
+BOOST_ASIO_INITFN_RESULT_TYPE(ComposedConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol, SocketService>& s,
Iterator begin, Iterator end, ConnectCondition connect_condition,
BOOST_ASIO_MOVE_ARG(ComposedConnectHandler) handler);
/*@}*/
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
#include <boost/asio/impl/connect.hpp>
#endif