Commit Graph

1800 Commits

Author SHA1 Message Date
Christopher Kohlhoff
838a259d0b Fix documentation error where an asynchronous function was described as
having synchronous behaviour.
2013-09-14 23:11:26 +10:00
Christopher Kohlhoff
ff5d07f717 Fix another socket descriptor comparison that doesn't work correctly if
the descriptor type is unsigned.
2013-09-14 23:11:06 +10:00
Christopher Kohlhoff
ca4c666b15 Ignore dirstamp. 2013-09-14 23:06:00 +10:00
Christopher Kohlhoff
79c2a96015 Add missing move cast. 2013-09-14 23:06:00 +10:00
Christopher Kohlhoff
8837bd220d Clean up some internal forward declarations. 2013-09-14 23:06:00 +10:00
Christopher Kohlhoff
552c16f27c Remove spurious whitespace. 2013-09-14 23:06:00 +10:00
Christopher Kohlhoff
c417708af8 Fix error in comment. 2013-09-14 23:06:00 +10:00
Christopher Kohlhoff
89cfb98217 Clarify that programs must not issue overlapping async_write_at operations. 2013-09-14 23:06:00 +10:00
Christopher Kohlhoff
1457c99b2b Enable the move optimisation (and otherwise eliminate a copy) for handlers
using the default invocation hook.
2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
90d3c85ed3 Fix link to refer to native_handle() rather than the deprecated native() function. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
50e8b56610 Suppress g++ 4.8+ warning about unused typedefs. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
16f1e60c54 Ensure signal number is correctly passed to the completion handler when
starting an async_wait on a signal that is already raised.
2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
e151c85349 Fix comparison used to test for a successful synchronous accept. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
c6d808c712 Fix a bug in handler tracking, where it was not correctly printing out some handler IDs. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
ad86ef20ba Ensure ssl::io_op::want_ member is initialised. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
ba52bf6138 Fix typo in serial ports overview. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
ff5ed66909 Fix a regression on Windows where multiple threads are running an io_service. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
6d378acf13 Fix nfds argument to select. 2013-09-14 23:05:59 +10:00
Christopher Kohlhoff
0a771be074 Remove unused parameters and member variables. 2013-09-14 22:56:13 +10:00
Christopher Kohlhoff
daf289c22f Fix a regression where, on some platforms, errors from async_connect are not
correctly propagated through to the completion handler.
2013-09-14 22:56:13 +10:00
Christopher Kohlhoff
e16acc0b47 Remove unused variable assignment. 2013-09-14 22:56:12 +10:00
Christopher Kohlhoff
c986c1e88e Fix error in async_receive_from example. 2013-09-14 22:56:12 +10:00
Christopher Kohlhoff
be45dc87d8 Remove dependency on Boost.Preprocessor library. 2013-09-14 22:25:52 +10:00
Christopher Kohlhoff
906f4f968b asio version 1.10.0 released 2013-09-14 22:03:43 +10:00
Christopher Kohlhoff
8a7e8a437b Revision history. 2013-09-14 20:44:25 +10:00
Christopher Kohlhoff
bb55d1d816 Regenerate documentation. 2013-09-14 20:37:29 +10:00
Christopher Kohlhoff
317da0d5f5 Add missing documentation for use_future_t::allocator_type. 2013-06-22 23:04:53 +10:00
Christopher Kohlhoff
a489d98cd4 Add mechanism for disabling automatic Winsock initialisation. 2013-06-22 22:28:44 +10:00
Christopher Kohlhoff
e661917a12 Fix memory leak in ssl::rfc2818_verification class. 2013-06-22 21:24:06 +10:00
Christopher Kohlhoff
7efa576e4d Support both boost.coroutine v1 and v2. 2013-06-22 21:20:38 +10:00
Christopher Kohlhoff
de7e33a1c6 Update documentation to cover new features. 2013-05-27 21:42:00 +10:00
Christopher Kohlhoff
ed80132017 Fix potential data race due to reading the reactor pointer outside the lock. 2013-05-25 22:28:51 +10:00
Christopher Kohlhoff
cbcfb0beba Boostify the futures example. 2013-05-25 22:28:51 +10:00
Christopher Kohlhoff
d9a21e469d Fix incorrect boostification of #warning message. 2013-05-25 20:11:15 +10:00
Christopher Kohlhoff
9d3b94eb6a Fix bug on Windows where certain operations might generate an error_code with
an invalid (i.e. NULL) error_category.
2013-05-25 20:11:15 +10:00
Christopher Kohlhoff
3a5f6881a5 Automatically disable SSL compression.
To mitigate the risk of certain attacks, SSL compression is now disabled
by default. To enable, you can use the new ssl::context::clear_options()
function like so:

  my_context.clear_options(asio::ssl::context::no_compression);
2013-05-25 20:11:15 +10:00
Christopher Kohlhoff
f826bcd519 Add assertions that num_buckets_ is non-zero. 2013-05-25 20:11:15 +10:00
Christopher Kohlhoff
8f62b7d18b Fix waitable timer documentation. 2013-05-25 20:11:15 +10:00
Christopher Kohlhoff
790c1813d3 Fix error in acceptor example. 2013-05-25 20:11:15 +10:00
Christopher Kohlhoff
d2fab1d6f5 Fix potential deadlock in signal_set implementation. 2013-05-25 18:36:52 +10:00
Christopher Kohlhoff
8bb255fd20 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);
2013-05-19 14:48:30 +10:00
Christopher Kohlhoff
ff98090acd Clean up boostified output. 2013-05-19 07:56:36 +10:00
Christopher Kohlhoff
300ba81889 Fix implementation of asynchronous connect operation so that it can cope
with spurious readiness notifications from the reactor.
2013-05-16 11:08:14 +10:00
Christopher Kohlhoff
af6fd3f9c2 Fix a problem with lost thread wakeups that can occur when making
concurrent calls to run() and poll() on the same io_service object.
2013-05-16 10:02:40 +10:00
Christopher Kohlhoff
1aa960ee0e Fix basic_waitable_timer's underlying implementation so that it can
handle any time_point value without overflowing the intermediate
duration objects.
2013-05-15 22:06:55 +10:00
Christopher Kohlhoff
a23aed7aa5 Remove the stackless coroutine class and macros from the HTTP server 4
example, and instead make them a part of Asio's documented interface.
2013-05-14 22:04:37 +10:00
Christopher Kohlhoff
1ed93cec61 Update copyright notices. 2013-05-14 12:29:10 +10:00
Christopher Kohlhoff
49dddfc525 Allow loading of SSL certificate and key data from memory buffers.
Added new buffer-based interfaces:
add_certificate_authority, use_certificate, use_certificate_chain,
use_private_key, use_rsa_private_key, use_tmp_dh.

Thanks go to Nick Jones <nick dot fa dot jones at gmail dot com>, on
whose work this commit is based.
2013-05-14 12:00:42 +10:00
Christopher Kohlhoff
16c12eb1ed Add set_verify_depth function to SSL context and stream.
Thanks go to Nick Jones <nick dot fa dot jones at gmail dot com>, on
whose work this commit is based.
2013-05-14 12:00:42 +10:00
Christopher Kohlhoff
ea1585c05c Support for creation of TLSv1.1 and TLSv1.2 contexts.
Thanks go to Alvin Cheung <alvin dot cheung at alumni dot ust dot hk>
and Nick Jones <nick dot fa dot jones at gmail dot com>, on whose work
this is based.
2013-05-14 12:00:41 +10:00