Commit Graph

9 Commits

Author SHA1 Message Date
Christopher Kohlhoff
ae04c26689 Update copyright notices. 2019-02-17 19:59:39 -10:00
Christopher Kohlhoff
886839cf55 Update copyright notices. 2018-03-04 21:59:30 +11:00
Christopher Kohlhoff
b60e92b13e Initial merge of Networking TS compatibility.
Merged from chriskohlhoff/asio master branch as of commit
4a4d28b0d24c53236e229bd1b5f378c9964b1ebb.
2017-10-23 21:48:43 +11:00
Christopher Kohlhoff
f7fa336c91 Update copyright notices. 2017-03-05 22:43:47 +11:00
Christopher Kohlhoff
36eef63a9c Update copyright notices. 2016-09-11 11:35:40 +10:00
Christopher Kohlhoff
41bf42b8da Update copyright notices. 2015-03-20 00:14:19 +11:00
Christopher Kohlhoff
28f690f504 Update copyright notices. 2014-05-03 09:25:39 +10:00
Christopher Kohlhoff
95d16d75b7 Update copyright notices.
[SVN r84345]
2013-05-18 11:24:59 +00:00
Christopher Kohlhoff
546362b425 Add the asio::use_future special value, which adds first-class support
for returning a C++11 std::future from an asynchronous operation's
initiating function.

To use asio::use_future, pass it to an asynchronous operation instead of
a normal completion handler. For example:

  std::future<std::size_t> length =
    my_socket.async_read_some(my_buffer, asio::use_future);

Where a completion handler signature has the form:

  void handler(error_code ec, result_type result);

the initiating function returns a std::future templated on result_type.
In the above example, this is std::size_t. If the asynchronous operation
fails, the error_code is converted into a system_error exception and
passed back to the caller through the future.

Where a completion handler signature has the form:

  void handler(error_code ec);

the initiating function returns std::future<void>. As above, an error
is passed back in the future as a system_error exception.


[SVN r84313]
2013-05-17 02:35:08 +00:00