Commit Graph

52 Commits

Author SHA1 Message Date
Christopher Kohlhoff
5b6dc5ba74 Update diagrams to use io_context rather than io_service. 2019-12-05 00:34:39 +11:00
Christopher Kohlhoff
0cb51946bb Minor documentation fixes. 2019-12-03 19:59:09 +11:00
Christopher Kohlhoff
baca9a092f Promote coroutines TS support classes to asio namespace.
The awaitable<>, co_spawn(), this_coro, detached, and redirect_error
facilities have been moved from the asio::experimental namespace to
namespace asio. As part of this change, the this_coro::token() awaitable
has been superseded by the asio::use_awaitable completion token.

Please note that the use_awaitable and redirect_error completion tokens
work only with asynchronous operations that use the new form of
async_result with member function initiate(). Furthermore, when using
use_awaitable, please be aware that the asynchronous operation is not
initiated until co_await is applied to the awaitable<>.
2019-02-28 00:02:00 +11:00
Christopher Kohlhoff
ae04c26689 Update copyright notices. 2019-02-17 19:59:39 -10:00
Christopher Kohlhoff
c599605ce5 Add C++11 version of SSL example. 2018-12-05 13:38:52 +11:00
Christopher Kohlhoff
6f3ab889f2 Fix library name. 2018-12-05 13:27:37 +11:00
Christopher Kohlhoff
6cdd5782aa Fix typo in 'Streams, Short Reads and Short Writes' documentation section. 2018-11-05 23:03:16 +11:00
Christopher Kohlhoff
9941b40754 Add Coroutines TS overview and examples to documentation. 2018-04-03 22:55:21 +10:00
Christopher Kohlhoff
886839cf55 Update copyright notices. 2018-03-04 21:59:30 +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
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
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
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
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
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
8acd8eb341 Add WinRT implementation notes.
[SVN r86153]
2013-10-04 00:00:46 +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
f97171acc9 Add documentation for new features.
[SVN r84529]
2013-05-27 12:17:19 +00:00
Christopher Kohlhoff
95d16d75b7 Update copyright notices.
[SVN r84345]
2013-05-18 11:24:59 +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
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
353e71c965 Fix bullet list.
[SVN r72805]
2011-06-29 23:31:37 +00:00
Christopher Kohlhoff
2a89061940 Use correct source mode.
[SVN r72407]
2011-06-05 14:34:45 +00:00
Christopher Kohlhoff
2f5fcaf01c * Add documentation for new features.
* Duration type should be signed in tick_count_timer example.

* Regenerate documentation.

* Make definition of BOOST_ASIO_MOVE_ARG and BOOST_ASIO_MOVE_CAST separate to
  the definition of BOOST_ASIO_HAS_MOVE, to allow the latter to be user-defined.


[SVN r72404]
2011-06-05 13:29:41 +00:00
Christopher Kohlhoff
56ce545fda * Use variadic templates when supported.
* On Windows, ensure the count of outstanding work is decremented for
  abandoned operations (i.e. operations that are being cleaned up within
  the io_service destructor).

* Fix basic_socket_streambuf compile error when using MSVC 10's std::array.

* Preserve the value of errno across the signal handler.

* Fix unused return value warning.

* Fix various minor documentation errors.


[SVN r70751]
2011-03-30 12:58:14 +00:00
Christopher Kohlhoff
06747ea7c9 * Add documentation for new asio::buffer() overloads for std::array.
* Improve backward compatibility of the new SSL implementation.

* Add wrapper for SSL_CTX_set_default_verify_paths().

* Document which OpenSSL functions the ssl::context member functions use.

* Add SSL certificate verification callbacks, and add a new
  ssl::rfc2818_verification function object for simple peer certificate
  verification based on the host name.

* Use std::atomic<> when available.

* Prefer to use std::array when it is available.

* Use std::shared_ptr and std::weak_ptr when available.

* Use a lightweight scoped smart pointer.

* Fix some shadow variable warnings with g++ 4.6.


[SVN r70384]
2011-03-22 01:21:50 +00:00
Christopher Kohlhoff
7139b456d2 Changes for asio version 1.5.0:
* Added support for timeouts on socket iostreams, such as
  ip::tcp::iostream. A timeout is set by calling expires_at() or
  expires_from_now() to establish a deadline. Any socket operations
  which occur past the deadline will put the iostream into a bad state.

* Added a new error() member function to socket iostreams, for
  retrieving the error code from the most recent system call.

* Added a new basic_deadline_timer::cancel_one() function. This function
  lets you cancel a single waiting handler on a timer. Handlers are
  cancelled in FIFO order.

* Added a new transfer_exactly() completion condition. This can be used
  to send or receive a specified number of bytes even if the total size
  of the buffer (or buffer sequence) is larger.

* Added new free functions connect() and async_connect(). These
  operations try each endpoint in a list until the socket is
  successfully connected.

* Extended the buffer_size() function so that it works for buffer
  sequences in addition to individual buffers.

* Added a new buffer_copy() function that can be used to copy the raw
  bytes between individual buffers and buffer sequences.

* Added new non-throwing overloads of read(), read_at(), write() and
  write_at() that do not require a completion condition.

* Added friendlier compiler errors for when a completion handler does
  not meet the necessary type requirements. When C++0x is available
  (currently supported for g++ 4.5 or later, and MSVC 10), static_assert
  is also used to generate an informative error message. Checking may be
  disabled by defining BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS.

* Made the is_loopback(), is_unspecified() and is_multicast() functions
  consistently available across the ip::address, ip::address_v4 and
  ip::address_v6 classes. Refs #3939.

* Added new non_blocking() functions for managing the non-blocking
  behaviour of a socket or descriptor. The io_control() commands named
  non_blocking_io are now deprecated in favour of these new functions.

* Added new native_non_blocking() functions for managing the
  non-blocking mode of the underlying socket or descriptor. These
  functions are intended to allow the encapsulation of arbitrary
  non-blocking system calls as asynchronous operations, in a way that is
  transparent to the user of the socket object. The functions have no
  effect on the behaviour of the synchronous operations of the socket or
  descriptor. Refs #3307.

* Added the io_control() member function for socket acceptors.
  Refs #3297.

* For consistency with the C++0x standard library, deprecated the
  native_type typedefs in favour of native_handle_type, and the native()
  member functions in favour of native_handle().

* Added a release() member function to posix descriptors. This function
  releases ownership of the underlying native descriptor to the caller.
  Refs #3900.

* Added support for sequenced packet sockets (SOCK_SEQPACKET).

* Added a new io_service::stopped() function that can be used to
  determine whether the io_service has stopped (i.e. a reset() call is
  needed prior to any further calls to run(), run_one(), poll() or
  poll_one()).

* Reduced the copying of handler function objects.

* Added support for C++0x move construction to further reduce copying of
  handler objects. Move support is enabled when compiling in -std=c++0x
  mode on g++ 4.5 or higher, or when using MSVC10.

* Removed the dependency on OS-provided macros for the well-known IPv4
  and IPv6 addresses. This should eliminate the annoying "missing braces
  around initializer" warnings. Refs #3741.

* Reduced the size of ip::basic_endpoint<> objects (such as
  ip::tcp::endpoint and ip::udp::endpoint).

* Changed the reactor backends to assume that any descriptors or sockets
  added using assign() may have been dup()-ed, and so require explicit
  deregistration from the reactor. Refs #4971.

* Changed the SSL error category to return error strings from the
  OpenSSL library.

* Changed the separate compilation support such that, to use Asio's SSL
  capabilities, you should also include 'asio/ssl/impl/src.hpp in one
  source file in your program.

* Removed the deprecated member functions named io_service(). The
  get_io_service() member functions should be used instead.

* Removed the deprecated typedefs resolver_query and resolver_iterator
  from the ip::tcp, ip::udp and ip::icmp classes.

* Fixed a compile error on some versions of g++ due to anonymous enums.
  Refs #4883.

* Added an explicit cast to the FIONBIO constant to int to suppress a
  compiler warning on some platforms. Refs #5128.

* Fixed warnings reported by g++'s -Wshadow compiler option. Refs #3905.


[SVN r69194]
2011-02-23 01:04:16 +00:00
Christopher Kohlhoff
b1dced94c8 Update copyright notice.
[SVN r68086]
2011-01-13 08:14:05 +00:00
Christopher Kohlhoff
33eeb63378 Doc updates.
[SVN r61643]
2010-04-28 12:39:06 +00:00
Christopher Kohlhoff
7efbb6060d Update to reflect reworked implementation.
[SVN r60850]
2010-03-26 02:44:27 +00:00
Christopher Kohlhoff
20a822c591 Update copyright notices.
[SVN r58623]
2010-01-02 01:24:52 +00:00
Christopher Kohlhoff
f367084009 Remove spurious word.
[SVN r55919]
2009-08-31 12:45:18 +00:00
Christopher Kohlhoff
13322b3c3b Add ping example.
[SVN r54767]
2009-07-07 12:37:15 +00:00
Christopher Kohlhoff
ebd662f38f Fix errors in SSL overview and add a note about handshaking. Fixes #2617 and #2619.
[SVN r50950]
2009-02-01 13:42:33 +00:00
Christopher Kohlhoff
0b5c6d9a2b Add a new POSIX-specific chat client showing how to use the
posix::stream_descriptor class.


[SVN r49483]
2008-10-29 12:50:58 +00:00
Christopher Kohlhoff
7823a1e69e Fix typo.
[SVN r49222]
2008-10-09 20:47:52 +00:00