Commit Graph

284 Commits

Author SHA1 Message Date
Christopher Kohlhoff
5a9af00480 Update timeout examples to use latest features.
* Use asio::steady_timer rather than asio::deadline_timer.
* Use asio::dynamic_buffer rather than asio::streambuf.
* Use timed asio::io_context::run_for() function for blocking clients.
* Add example showing a custom completion token for blocking with timeouts.
2018-04-01 08:42:42 +10:00
Christopher Kohlhoff
9093bef944 Add interim revision history. 2018-03-07 17:37:50 +11:00
Christopher Kohlhoff
a67dd90708 Regenerate documentation. 2018-03-04 23:13:03 +11:00
Christopher Kohlhoff
4d7a656b66 Add experimental features to documentation. 2018-03-04 23:09:04 +11:00
Christopher Kohlhoff
886839cf55 Update copyright notices. 2018-03-04 21:59:30 +11:00
Christopher Kohlhoff
0f552b757f Exclude use_future_t implementation detail from documentation. 2018-03-04 21:55:26 +11:00
Christopher Kohlhoff
3b4289ef69 Workaround broken doxygen typedef linking when primary template is undefined. 2018-03-04 21:54:15 +11:00
Christopher Kohlhoff
6814d260d0 Clarification and tidy up. 2017-12-06 09:19:35 +11:00
Christopher Kohlhoff
31e5496b32 Fix typo. 2017-12-06 09:13:05 +11:00
Christopher Kohlhoff
2d7d67be48 Document the new concurrency hints. 2017-12-06 08:22:09 +11:00
Christopher Kohlhoff
b79c3ab31f Some updates to 'Using' notes. 2017-12-06 07:36:58 +11:00
Christopher Kohlhoff
ee3d1c244d Copy new examples into documentation. 2017-12-06 00:16:53 +11:00
Christopher Kohlhoff
f3246b9471 Revision history. 2017-12-06 00:09:35 +11:00
Christopher Kohlhoff
85f4cbdb1e Document Networking TS changes. 2017-12-06 00:01:53 +11:00
Christopher Kohlhoff
05f95284ee Remove spurious value_type from buffer sequence requirements. 2017-12-05 23:57:49 +11:00
Christopher Kohlhoff
c6f1b8ffc9 Use new move-enabled form of async_accept. 2017-12-05 07:37:41 +11:00
Christopher Kohlhoff
2c21c34a63 Document the new handler tracking features. 2017-12-03 21:54:45 +11:00
Christopher Kohlhoff
286a6eb500 Regenerate documentation. 2017-12-02 16:26:54 +11:00
Christopher Kohlhoff
d74cfaa90d Add custom handler tracking example. 2017-12-02 16:12:57 +11:00
Christopher Kohlhoff
86fd2f7abc Create C++11 versions of the fork, local, multicast and nonblocking examples. 2017-12-02 16:12:57 +11:00
Christopher Kohlhoff
ea2a35c9e0 asio/use_future.hpp is already in the convenience header. 2017-12-02 10:06:37 +11:00
Christopher Kohlhoff
8a8157c36d Add waitable timer headers to convenience header. 2017-12-02 09:16:54 +11:00
Christopher Kohlhoff
15e436d8fa Fix up reference to post(). 2017-12-02 09:03:15 +11:00
Christopher Kohlhoff
05ece65ac9 Show how to associate an executor using nested type and member function. 2017-12-02 09:03:15 +11:00
Christopher Kohlhoff
d83e96a444 Update allocation overview and examples to use new form. 2017-12-02 09:03:15 +11:00
Christopher Kohlhoff
b3550ef8be Fix typo in strands overview. 2017-12-02 09:03:14 +11:00
Christopher Kohlhoff
b77a45e2e5 Fix incorrect hyperlink target. 2017-12-02 09:03:14 +11:00
Christopher Kohlhoff
b510bb4758 Regenerate documentation. 2017-10-24 07:33:27 +11:00
Christopher Kohlhoff
e715a08e90 Patch up some template links. 2017-10-24 07:32:54 +11:00
Christopher Kohlhoff
a1b83428b7 Update quick reference table. 2017-10-24 07:32:54 +11:00
Christopher Kohlhoff
0613d396ff Add new macros to doxygen configuration. 2017-10-24 07:32:54 +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
821ef6fd50 Revision history. 2017-08-01 23:05:20 +10:00
Christopher Kohlhoff
7a79c157fc Revision history. 2017-03-08 07:28:09 +11:00
Christopher Kohlhoff
aff810b55d Regenerate documentation. 2017-03-08 07:10:56 +11:00
Christopher Kohlhoff
5aa758b54a Ignore new macro when generating documentation. 2017-03-08 07:10:48 +11:00
Christopher Kohlhoff
fba6c4ccbd Add limited support for regular file descriptors.
The epoll_reactor now supports the use of regular file descriptors with
posix::stream_descriptor, provided the I/O operations on them never fail
with EAGAIN or EWOULDBLOCK. If the descriptor cannot be added to the
epoll set using epoll_ctl, and errno is EPERM (indicating an unsupported
descriptor type), then no error condition is raised. Instead, any
operation which would require a trip through the reactor will fail.
2017-03-05 22:56:48 +11:00
Christopher Kohlhoff
f7fa336c91 Update copyright notices. 2017-03-05 22:43:47 +11:00
Rene Rivera
d6d2c452f5 Switch to standalone docs for release.
This hopefully addresses formatting issues.
2017-01-21 08:05:38 -06:00
Rene Rivera
6ef8c1566c Add, and update, documentation build targets. 2016-10-07 23:03:40 -05:00
Christopher Kohlhoff
350f94e722 Revision history. 2016-09-19 07:33:03 +10:00
Christopher Kohlhoff
3ed131266c Regenerate documentation. 2016-09-16 08:27:01 +10:00
Christopher Kohlhoff
36eef63a9c Update copyright notices. 2016-09-11 11:35:40 +10:00
Daniel
629875892b Fix the build location for asio.
Boost build has changed so that documentation is built relative to the
Jamfile, rather than the current working directory. This broke the ASIO
documentation build, to fix it specify the location using the 'name'
parameter - which is a bit wonky, but it's what boost build looks for.
2016-05-29 13:04:16 +01:00
Christopher Kohlhoff
c0d667f36a Revision history. 2015-12-14 12:01:10 +11:00
Christopher Kohlhoff
6582b6966a Fix typo in comment. 2015-12-10 22:51:53 +11:00
Christopher Kohlhoff
ccb7292b2d Revision history. 2015-03-22 10:58:13 +11:00
Christopher Kohlhoff
181e5f6db2 Regenerate documentation. 2015-03-22 10:02:12 +11:00
Christopher Kohlhoff
41bf42b8da Update copyright notices. 2015-03-20 00:14:19 +11:00
Christopher Kohlhoff
ea2c024b32 Revision history. 2014-10-17 22:49:14 +11:00
Christopher Kohlhoff
d109f120fa Explicitly mark asio::strand as deprecated.
Use asio::io_service::strand instead.
2014-10-17 22:49:14 +11:00
Christopher Kohlhoff
fa5673da56 Specify additional headers that don't have a convenience header.
Fixes boost trac ticket #10567.
2014-10-16 19:23:58 +11:00
Christopher Kohlhoff
2ab8462f29 Unit test workaround for AIX. 2014-07-26 19:49:22 +10:00
Christopher Kohlhoff
b857c146c0 Revision history. 2014-07-26 19:27:51 +10:00
Christopher Kohlhoff
1f012a03eb Fix wording in revision history. 2014-06-30 14:12:43 +10:00
Christopher Kohlhoff
7f3a87c81a Revision history. 2014-06-30 14:02:40 +10:00
Christopher Kohlhoff
f769012dc3 Ignore generated html. 2014-05-05 11:48:23 +10:00
Christopher Kohlhoff
b66a114d89 Revision history. 2014-05-05 11:41:40 +10:00
Christopher Kohlhoff
ba9f99216f Regenerate documentation. 2014-05-04 10:06:45 +10:00
Christopher Kohlhoff
a6feafa553 Regenerate documentation. 2014-05-03 11:52:17 +10:00
Christopher Kohlhoff
28f690f504 Update copyright notices. 2014-05-03 09:25:39 +10:00
Christopher Kohlhoff
83ae6fa7cb Updated revision history.
[SVN r86468]
2013-10-26 22:49:17 +00:00
Christopher Kohlhoff
0d57ea2d16 Fix typos in spawn() documentation.
[SVN r86465]
2013-10-26 22:42:53 +00:00
Christopher Kohlhoff
0113c1831f Add a note to clarify that concurrent invocation is not guaranteed for handlers in different strands.
[SVN r86464]
2013-10-26 22:39:23 +00:00
Christopher Kohlhoff
40cba52d74 Fix dead links in documentation.
[SVN r86154]
2013-10-04 00:03:36 +00:00
Christopher Kohlhoff
8acd8eb341 Add WinRT implementation notes.
[SVN r86153]
2013-10-04 00:00:46 +00:00
Christopher Kohlhoff
f8f33ed29c Revision history.
[SVN r86092]
2013-09-30 22:37:40 +00:00
Daniel James
cf6b86a4c9 Fix copying C++11 allocation examples
[SVN r85823]
2013-09-22 10:32:36 +00:00
Christopher Kohlhoff
91fce6c711 Regenerate documentation.
[SVN r85801]
2013-09-20 12:10:45 +00:00
Christopher Kohlhoff
18f477583d Regenerate documentation.
[SVN r85765]
2013-09-17 22:32:13 +00:00
Christopher Kohlhoff
0bc20e40dd Fix link to refer to native_handle() rather than the deprecated native() function.
[SVN r85748]
2013-09-17 21:48:54 +00:00
Christopher Kohlhoff
8bc2679db6 Fix typo in serial ports overview.
[SVN r85742]
2013-09-17 21:40:19 +00:00
Christopher Kohlhoff
0923bc6904 Revision history.
[SVN r84880]
2013-06-22 13:02:21 +00:00
Christopher Kohlhoff
617ecf2598 Regenerate documentation.
[SVN r84879]
2013-06-22 12:58:50 +00:00
Christopher Kohlhoff
f97171acc9 Add documentation for new features.
[SVN r84529]
2013-05-27 12:17:19 +00:00
Christopher Kohlhoff
a05bbf3a53 Regenerate documentation.
[SVN r84494]
2013-05-25 13:03:48 +00:00
Christopher Kohlhoff
abd9cdb60f Add generic socket protocols and converting move constructors.
Four new protocol classes have been added:

- asio::generic::datagram_protocol
- asio::generic::raw_protocol
- asio::generic::seq_packet_protocol
- asio::generic::stream_protocol

These classes implement the Protocol type requirements, but allow the
user to specify the address family (e.g. AF_INET) and protocol type
(e.g. IPPROTO_TCP) at runtime.

A new endpoint class template, asio::generic::basic_endpoint, has been
added to support these new protocol classes. This endpoint can hold any
other endpoint type, provided its native representation fits into a
sockaddr_storage object.

When using C++11, it is now possible to perform move construction from a
socket (or acceptor) object to convert to the more generic protocol's
socket (or acceptor) type. If the protocol conversion is valid:

  Protocol1 p1 = ...;
  Protocol2 p2(p1);

then the corresponding socket conversion is allowed:

  Protocol1::socket socket1(io_service);
  ...
  Protocol2::socket socket2(std::move(socket1));

For example, one possible conversion is from a TCP socket to a generic
stream-oriented socket:

  asio::ip::tcp::socket socket1(io_service);
  ...
  asio::generic::stream_protocol::socket socket2(std::move(socket1));

The conversion is also available for move-assignment. Note that these
conversions are not limited to the newly added generic protocol classes.
User-defined protocols may take advantage of this feature by similarly
ensuring the conversion from Protocol1 to Protocol2 is valid, as above.

As a convenience, the socket acceptor's accept() and async_accept()
functions have been changed so that they can directly accept into a
different protocol's socket type, provided the protocol conversion is
valid. For example, the following is now possible:

  asio::ip::tcp::acceptor acceptor(io_service);
  ...
  asio::generic::stream_protocol::socket socket1(io_service);
  acceptor.accept(socket1);


[SVN r84363]
2013-05-19 04:55:11 +00:00
Christopher Kohlhoff
34f88cf707 Remove some trailing spaces and fix another copyright notice.
[SVN r84361]
2013-05-18 21:56:31 +00:00
Christopher Kohlhoff
280a7d55b3 Remove the stackless coroutine class and macros from the HTTP server 4
example, and instead make them a part of Asio's documented interface.


[SVN r84346]
2013-05-18 11:54:59 +00:00
Christopher Kohlhoff
95d16d75b7 Update copyright notices.
[SVN r84345]
2013-05-18 11:24:59 +00:00
Christopher Kohlhoff
1c9d4a1ac3 Support handshake with re-use of data already read from the wire.
Add new overloads of the SSL stream's handshake() and async_handshake()
functions, that accepts a ConstBufferSequence to be used as initial
input to the ssl engine for the handshake procedure.

Thanks go to Nick Jones <nick dot fa dot jones at gmail dot com>, on
whose work this commit is partially based.


[SVN r84319]
2013-05-17 10:52:08 +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
Christopher Kohlhoff
4f1d36c7a1 Move existing examples into a C++03-specific directory, and add a new
directory for C++11-specific examples. A limited subset of the C++03
examples have been converted to their C++11 equivalents.


[SVN r84312]
2013-05-17 02:25:10 +00:00
Christopher Kohlhoff
be0221203a Add new traits classes, handler_type and async_result, that allow
the customisation of the return type of an initiating function.


[SVN r84308]
2013-05-16 23:26:04 +00:00
Christopher Kohlhoff
007bf03d0c Release notes.
[SVN r82553]
2013-01-20 01:46:48 +00:00
Christopher Kohlhoff
13353857a5 Regenerate documentation.
[SVN r82288]
2012-12-30 22:39:30 +00:00
Christopher Kohlhoff
d2679ef618 Revision history.
[SVN r79997]
2012-08-13 11:31:11 +00:00
Christopher Kohlhoff
cf17fa2fc8 Use the thread's private_op_queue for handlers returned by the reactor task.
This fixes a problem where signal_set handlers are not being called when the
io_service's concurrency hint is set to 1. Refs #6657.


[SVN r78739]
2012-05-28 22:03:36 +00:00
Christopher Kohlhoff
5882dc476c Add support for g++ 4.7 when compiling in C++11 mode. Update revision history.
[SVN r78738]
2012-05-28 21:36:43 +00:00
Christopher Kohlhoff
4456432d2e Revision history.
[SVN r78668]
2012-05-26 22:30:57 +00:00
Christopher Kohlhoff
b4e3ff2d9e Fixed a bug where the second buffer in an array of two buffers may be ignored
if the first buffer is empty.


[SVN r77033]
2012-02-15 22:16:53 +00:00
Christopher Kohlhoff
40608f9e0d Reverted earlier change to allow some speculative operations to be performed
without holding the lock, as it introduced a race condition in some
multithreaded scenarios.


[SVN r76990]
2012-02-12 12:53:06 +00:00
Christopher Kohlhoff
4e9e7b595b Update copyright year.
[SVN r76513]
2012-01-15 13:18:46 +00:00
Christopher Kohlhoff
5777189dc8 Add missing class.
[SVN r76512]
2012-01-15 12:52:58 +00:00
Christopher Kohlhoff
c8098f25eb Update documentation.
[SVN r76511]
2012-01-15 12:51:20 +00:00
Christopher Kohlhoff
30f3e430a7 Update copyright notices.
[SVN r76420]
2012-01-11 23:04:08 +00:00
Christopher Kohlhoff
81f394e29d Added object_handle support.
[SVN r76397]
2012-01-10 09:58:05 +00:00
Christopher Kohlhoff
40316dfdb4 Chrono support.
[SVN r76380]
2012-01-09 13:43:38 +00:00
Christopher Kohlhoff
895717964e Revert previous incorrect commit.
[SVN r76379]
2012-01-09 12:55:45 +00:00
Christopher Kohlhoff
96fd7e1906 Exclude detail class from documentation.
[SVN r76378]
2012-01-09 12:53:32 +00:00