Commit Graph

864 Commits

Author SHA1 Message Date
Christopher Kohlhoff
e4e914bc4d Fix type aliasing issue reported by gcc.
Fixes boost trac ticket #9550.
2014-05-03 10:17:42 +10:00
Christopher Kohlhoff
c06aa74f08 Make select_reactor more efficient on Windows for large numbers of sockets.
Fixes boost trac ticket #9528.
2014-05-03 10:15:07 +10:00
Christopher Kohlhoff
1417badc04 Clarify that commit() and consume() do not throw.
Fixes boost trac ticket #9605.
2014-05-03 10:14:11 +10:00
Christopher Kohlhoff
9e75760570 Fix infinite recursion in operator~ implementation.
Fixes boost trac ticket #9548.
2014-05-03 10:13:08 +10:00
Christopher Kohlhoff
981addd4ee Fix incorrect documentation on async_send.
Fixed boost trac ticket #9771.
2014-05-03 10:11:02 +10:00
Christopher Kohlhoff
660e9fe302 Fix occasional close() system call hang on MacOS.
Repeated re-registration of kqueue event filters seems to behave as
though there is some kind of "leak" on MacOS, culminating in a suspended
close() system call and an unkillable process. To avoid this, we will
register a descriptor's kqueue event filters once only i.e. when the
descriptor is first created.
2014-05-03 10:10:12 +10:00
Christopher Kohlhoff
92a53bd3cc Compute greatest common divisor to prevent unnecessary integer overflow.
Fixes boost trac tickets #9662, #9778.
2014-05-03 10:09:04 +10:00
Christopher Kohlhoff
bd50a1b593 Ensure incomplete coroutines are correctly unwound.
We must take care not to hold a shared_ptr to the coroutine across
its own suspension point, otherwise it will not be unwound by the
io_service destructor. Move-enabled C++11 compilers take care of this
automatically, but with C++03 we must explicitly reset the shared_ptr.

Fixes boost trac ticket #9731.
2014-05-03 10:05:23 +10:00
Christopher Kohlhoff
85640f548a Fix spawn() when Boost.Coroutine v2 is used.
Fixes boost trac tickets #9442, #9928.
2014-05-03 09:40:42 +10:00
Christopher Kohlhoff
3cc2cd94be Fix delegation of continuation hook.
Fixes boost trac ticket #9741.
2014-05-03 09:28:25 +10:00
Christopher Kohlhoff
8dd99f4e04 Make system_error available via error.hpp. 2014-05-03 09:27:36 +10:00
Christopher Kohlhoff
02659b6fde Add extra #include needed by latest Xcode. 2014-05-03 09:26:42 +10:00
Christopher Kohlhoff
28f690f504 Update copyright notices. 2014-05-03 09:25:39 +10:00
Christopher Kohlhoff
0e90106a30 Make develop identical to master. 2014-05-03 08:57:44 +10: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
41899ae46a Support older versions of OpenSSL that don't supply SSL_CTX_clear_options.
[SVN r86463]
2013-10-26 22:35:32 +00:00
Christopher Kohlhoff
8612b7b1bd Suppress conversion warnings reported by MSVC.
[SVN r86462]
2013-10-26 22:32:01 +00:00
Christopher Kohlhoff
813f272583 Fix WinRT detection.
[SVN r86152]
2013-10-03 23:59:54 +00:00
Christopher Kohlhoff
e290a34cd3 Reverted asio changed made under [85904], [85952], [86050] and [86105]. Will reconsider after 1.55 is released.
[SVN r86151]
2013-10-03 22:59:24 +00:00
Stephen Kelly
bf56879631 Asio: Remove obsolete GCC version checks.
[SVN r86105]
2013-10-01 08:42:20 +00:00
Stephen Kelly
dafe0562c7 ASIO: Clean up pragma guard comment.
[SVN r86050]
2013-09-30 11:22:07 +00:00
Stephen Kelly
93b2b4dc46 Remove obsolete MSVC check from pragma guard
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq

is now clean.

[SVN r85952]
2013-09-26 13:02:51 +00:00
Stephen Kelly
b571d87989 Asio: Remove obsolete MSVC version check.
[SVN r85904]
2013-09-25 13:51:51 +00:00
Christopher Kohlhoff
03b51d1764 MinGW fix.
[SVN r85799]
2013-09-20 12:02:33 +00:00
Christopher Kohlhoff
2c7c13012a Update buffered stream operations to adhere to current handler patterns.
[SVN r85798]
2013-09-20 12:00:44 +00:00
Christopher Kohlhoff
d08bc082f2 Implement end-of-file condition for WinRT stream sockets.
[SVN r85781]
2013-09-18 22:43:01 +00:00
Christopher Kohlhoff
d3845b7fd3 Fix prefix on extern "C" function name.
[SVN r85768]
2013-09-17 22:53:17 +00:00
Christopher Kohlhoff
1cd626f4d7 Add use_future support for Microsoft Visual C++.
[SVN r85767]
2013-09-17 22:42:50 +00:00
Christopher Kohlhoff
8047e7f180 Enable move support for Microsoft Visual C++ 2012.
[SVN r85766]
2013-09-17 22:38:04 +00:00
Christopher Kohlhoff
e746865f78 Initial port to Windows Runtime.
This change adds limited support for using Asio with the Windows
Runtime. It requires that the language extensions be enabled. Due to the
restricted facilities exposed by the Windows Runtime API, the port comes
with the following caveats:

* The core facilities such as the io_service, strand, buffers, composed
  operations, timers, etc., should all work as normal.

* For sockets, only client-side TCP is supported.

* Explicit binding of a client-side TCP socket is not supported.

* The cancel() function is not supported for sockets. Asynchronous
  operations may only be cancelled by closing the socket.

* Operations that use null_buffers are not supported.

* Only tcp::no_delay and socket_base::keep_alive options are supported.

* Resolvers do not support service names, only numbers. I.e. you must
  use 80 rather than http.

* Most resolver query flags have no effect.


[SVN r85764]
2013-09-17 22:24:19 +00:00
Christopher Kohlhoff
d6bb7d0e4a Eliminate some unnecessary handler copies.
[SVN r85763]
2013-09-17 22:14:14 +00:00
Christopher Kohlhoff
9e2fc1f61e Some async operations that missed getting the async_result treatment.
[SVN r85762]
2013-09-17 22:12:07 +00:00
Christopher Kohlhoff
06e5aeedca Visual C++ language extensions use generic as a keyword. Add a
workaround that renames the namespace to cpp_generic when those
language extensions are in effect.


[SVN r85761]
2013-09-17 22:08:43 +00:00
Christopher Kohlhoff
12f4e8280b Enable certain C++11 standard library facilities for recent versions of Microsoft Visual Studio.
[SVN r85760]
2013-09-17 22:08:07 +00:00
Christopher Kohlhoff
4752c98d59 Inore ERROR_MORE_DATA as a non-fatal error when returned by
GetOverlappedResult for a synchronous read.


[SVN r85759]
2013-09-17 22:06:25 +00:00
Christopher Kohlhoff
07f0ea9996 Remove use of std::min.
[SVN r85758]
2013-09-17 22:05:38 +00:00
Christopher Kohlhoff
10dd1488c7 Add missing forward declarations needed for Windows.
[SVN r85757]
2013-09-17 22:04:55 +00:00
Christopher Kohlhoff
558a771072 Fix documentation error where an asynchronous function was described as
having synchronous behaviour.


[SVN r85756]
2013-09-17 22:04:10 +00:00
Christopher Kohlhoff
799f24ddf8 Fix another socket descriptor comparison that doesn't work correctly if
the descriptor type is unsigned.


[SVN r85755]
2013-09-17 22:03:29 +00:00
Christopher Kohlhoff
5cd67a72cc Add missing move cast.
[SVN r85754]
2013-09-17 22:01:26 +00:00
Christopher Kohlhoff
dcc918d0a9 Clean up some internal forward declarations.
[SVN r85753]
2013-09-17 22:00:53 +00:00
Christopher Kohlhoff
8fafa6f60a Remove spurious whitespace.
[SVN r85752]
2013-09-17 21:53:45 +00:00
Christopher Kohlhoff
c230dd2ed0 Fix error in comment.
[SVN r85751]
2013-09-17 21:53:03 +00:00
Christopher Kohlhoff
131b7a25ab Clarify that programs must not issue overlapping async_write_at operations.
[SVN r85750]
2013-09-17 21:52:27 +00:00
Christopher Kohlhoff
32a41f7871 Enable the move optimisation (and otherwise eliminate a copy) for handlers
using the default invocation hook.


[SVN r85749]
2013-09-17 21:51:28 +00:00
Christopher Kohlhoff
aba096cc75 Suppress g++ 4.8+ warning about unused typedefs.
[SVN r85747]
2013-09-17 21:45:43 +00:00
Christopher Kohlhoff
749e9d2219 Ensure signal number is correctly passed to the completion handler when
starting an async_wait on a signal that is already raised.


[SVN r85746]
2013-09-17 21:43:29 +00:00
Christopher Kohlhoff
d203da445e Fix comparison used to test for a successful synchronous accept.
[SVN r85745]
2013-09-17 21:42:48 +00:00
Christopher Kohlhoff
475e3239e5 Fix a bug in handler tracking, where it was not correctly printing out some handler IDs.
[SVN r85744]
2013-09-17 21:42:08 +00:00
Christopher Kohlhoff
d747598321 Ensure ssl::io_op::want_ member is initialised.
[SVN r85743]
2013-09-17 21:41:04 +00:00
Christopher Kohlhoff
c57920f5df Fix a regression on Windows where multiple threads are running an io_service.
[SVN r85741]
2013-09-17 21:39:38 +00:00
Christopher Kohlhoff
f6359cbf6e Fix nfds argument to select.
[SVN r85740]
2013-09-17 21:38:41 +00:00
Christopher Kohlhoff
5554bf5a6c Remove unused parameters and member variables.
[SVN r85739]
2013-09-17 21:36:54 +00:00
Christopher Kohlhoff
0199ad5d3b Fix a regression where, on some platforms, errors from async_connect are not
correctly propagated through to the completion handler.


[SVN r85738]
2013-09-17 21:35:43 +00:00
Christopher Kohlhoff
aea3d133c4 Remove unused variable assignment.
[SVN r85737]
2013-09-17 21:33:39 +00:00
Christopher Kohlhoff
e4b1e832d2 Fix error in async_receive_from example.
[SVN r85736]
2013-09-17 21:32:48 +00:00
Christopher Kohlhoff
977543973d Remove dependency on Boost.Preprocessor library.
[SVN r85735]
2013-09-17 21:31:55 +00:00
Christopher Kohlhoff
623a696a78 Sync version number with release branch.
[SVN r85716]
2013-09-16 22:38:05 +00:00
Christopher Kohlhoff
bf00b5d6d7 Add missing documentation for use_future_t::allocator_type.
[SVN r84878]
2013-06-22 12:57:51 +00:00
Christopher Kohlhoff
a897f60e3d Add mechanism for disabling automatic Winsock initialisation. Refs #3605
[SVN r84877]
2013-06-22 12:47:44 +00:00
Christopher Kohlhoff
74907c9aa2 Fix memory leak in ssl::rfc2818_verification class.
[SVN r84876]
2013-06-22 12:45:33 +00:00
Christopher Kohlhoff
5120123082 Add support for both boost.coroutine v1 and v2.
[SVN r84875]
2013-06-22 12:44:53 +00:00
Christopher Kohlhoff
f97171acc9 Add documentation for new features.
[SVN r84529]
2013-05-27 12:17:19 +00:00
Christopher Kohlhoff
661fb4bac6 Fix potential data race due to reading the reactor pointer outside the lock.
[SVN r84492]
2013-05-25 12:35:43 +00:00
Christopher Kohlhoff
642a1cf824 Fix problem in #warning directive. Refs #7939
[SVN r84488]
2013-05-25 11:57:36 +00:00
Christopher Kohlhoff
e9d0dda331 Fix bug on Windows where certain operations might generate an error_code with
an invalid (i.e. NULL) error_category. Refs #8613


[SVN r84487]
2013-05-25 11:52:54 +00:00
Christopher Kohlhoff
bbf94e800e 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);


[SVN r84486]
2013-05-25 11:50:52 +00:00
Christopher Kohlhoff
2b7646ae8d Add assertions that num_buckets_ is non-zero. Refs #7739
[SVN r84485]
2013-05-25 11:46:20 +00:00
Christopher Kohlhoff
b9ae1e866c Fix waitable timer documentation. Refs #8602
[SVN r84484]
2013-05-25 11:41:19 +00:00
Christopher Kohlhoff
2d307d2dcd Fix error in acceptor example. Refs #8421
[SVN r84483]
2013-05-25 11:38:01 +00:00
Christopher Kohlhoff
22d8e5e5f8 Fix potential deadlock in signal_set implementation.
[SVN r84482]
2013-05-25 11:35:10 +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
c607f44ac6 Fix implementation of asynchronous connect operation so that it can cope
with spurious readiness notifications from the reactor.


[SVN r84349]
2013-05-18 12:13:17 +00:00
Christopher Kohlhoff
85e9b528c4 Fix a problem with lost thread wakeups that can occur when making
concurrent calls to run() and poll() on the same io_service object.


[SVN r84348]
2013-05-18 12:07:00 +00:00
Christopher Kohlhoff
ff5799ea7e Fix basic_waitable_timer's underlying implementation so that it can
handle any time_point value without overflowing the intermediate
duration objects.


[SVN r84347]
2013-05-18 12:01:59 +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
93610840c2 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.


[SVN r84325]
2013-05-17 11:04:11 +00:00
Christopher Kohlhoff
6bc7463804 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.


[SVN r84322]
2013-05-17 11:00:49 +00:00
Christopher Kohlhoff
0257ed7a11 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.


[SVN r84320]
2013-05-17 10:57:02 +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
d3adbad455 Minor cleanup.
[SVN r84316]
2013-05-17 10:15:21 +00:00
Christopher Kohlhoff
9644fab951 Partially decouple Asio from other boost components via an extra level
of indirection.


[SVN r84315]
2013-05-17 10:06:50 +00:00
Christopher Kohlhoff
1bba399354 Add a new handler hook called asio_handler_is_continuation.
Asynchronous operations may represent a continuation of the asynchronous
control flow associated with the current handler. Asio's implementation
can use this knowledge to optimise scheduling of the handler.

The asio_handler_is_continuation hook returns true to indicate whether a
completion handler represents a continuation of the current call
context. The default implementation of the hook returns false, and
applications may customise the hook when necessary. The hook has already
been customised within Asio to return true for the following cases:

- Handlers returned by strand.wrap(), when the corresponding
  asynchronous operation is being initiated from within the strand.

- The internal handlers used to implement the asio::spawn() function's
  stackful coroutines.

- When an intermediate handler of a composed operation (e.g.
  asio::async_read(), asio::async_write(), asio::async_connect(),
  ssl::stream<>, etc.) starts a new asynchronous operation due to the
  composed operation not being complete.

To support this optimisation, a new running_in_this_thread() member
function has been added to the io_service::strand class. This function
returns true when called from within a strand.


[SVN r84314]
2013-05-17 03:07:51 +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
e4b53793cc Add the asio::spawn() function, a high-level wrapper for running
stackful coroutines. It is based on the Boost.Coroutine library.

Here is an example of its use:

  asio::spawn(my_strand, do_echo);

  // ...

  void do_echo(asio::yield_context yield)
  {
    try
    {
      char data[128];
      for (;;)
      {
        std::size_t length =
          my_socket.async_read_some(
            asio::buffer(data), yield);

        asio::async_write(my_socket,
            asio::buffer(data, length), yield);
      }
    }
    catch (std::exception& e)
    {
      // ...
    }
  }

The first argument to asio::spawn() may be a strand, io_service or
completion handler. This argument determines the context in which the
coroutine is permitted to execute. For example, a server's per-client
object may consist of multiple coroutines; they should all run on the
same strand so that no explicit synchronisation is required.

The second argument is a function object with signature (**):

  void coroutine(asio::yield_context yield);

that specifies the code to be run as part of the coroutine. The
parameter yield may be passed to an asynchronous operation in place of
the completion handler, as in:

  std::size_t length =
    my_socket.async_read_some(
      asio::buffer(data), yield);

This starts the asynchronous operation and suspends the coroutine. The
coroutine will be resumed automatically when the asynchronous operation
completes.

Where a completion handler signature has the form:

  void handler(error_code ec, result_type result);

the initiating function returns the result_type. In the async_read_some
example above, this is std::size_t. If the asynchronous operation fails,
the error_code is converted into a system_error exception and thrown.

Where a completion handler signature has the form:

  void handler(error_code ec);

the initiating function returns void. As above, an error is passed back
to the coroutine as a system_error exception.

To collect the error_code from an operation, rather than have it throw
an exception, associate the output variable with the yield_context as
follows:

  error_code ec;
  std::size_t length =
    my_socket.async_read_some(
      asio::buffer(data), yield[ec]);

**Note: if asio::spawn() is used with a custom completion handler of
type Handler, the function object signature is actually:
  
  void coroutine(asio::basic_yield_context<Handler> yield);


[SVN r84311]
2013-05-17 01:38:47 +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
0dfdb9b45c Enable handler type requirements static_assert on clang.
[SVN r84301]
2013-05-16 21:34:54 +00:00
Christopher Kohlhoff
9a5cfcb604 Version bump.
[SVN r82286]
2012-12-30 22:01:28 +00:00
Christopher Kohlhoff
88cf604923 Add missing include of asio/error.hpp header.
[SVN r82279]
2012-12-29 23:21:32 +00:00
Christopher Kohlhoff
e7d150b823 Add missing include of <climits> header.
[SVN r82278]
2012-12-29 23:10:17 +00:00
Christopher Kohlhoff
e2e33e0f31 Add a small block recycling optimisation.
[SVN r82265]
2012-12-29 13:30:34 +00:00
Christopher Kohlhoff
901bd9d539 Enable noexcept qualifier for error categories. Refs #7797
[SVN r82264]
2012-12-29 13:24:03 +00:00
Christopher Kohlhoff
0a4b463f70 Fix deadlock that can occur on Windows when shutting down a pool of io_service threads due to running out of work. Refs #7552
[SVN r82263]
2012-12-29 13:22:16 +00:00
Christopher Kohlhoff
e5cc32264b Use _snwprintf to address a compile error due to the changed swprintf signature in recent versions of MinGW. Refs #7373
[SVN r82262]
2012-12-29 13:20:44 +00:00
Christopher Kohlhoff
817b56a269 Use long rather than int for SSL_CTX options, to match OpenSSL. Refs #7209
[SVN r82261]
2012-12-29 13:17:59 +00:00
Christopher Kohlhoff
489f421f8e Fix error in example embedded in basic_socket::get_option's documentation. Refs #7562
[SVN r82259]
2012-12-29 13:12:49 +00:00
Christopher Kohlhoff
e8c6842df7 Fix typos in comments. Refs #7761
[SVN r82258]
2012-12-29 13:11:43 +00:00
Christopher Kohlhoff
f65f8bd9f8 Fix some 64-to-32-bit conversion warnings. Refs #7459
[SVN r82257]
2012-12-29 13:08:30 +00:00
Vicente J. Botet Escriba
27896e9147 System/FileSystem/Asio/Thread: ref #7278 Added noexcept to Boost.System to conform with C++11
[SVN r81808]
2012-12-09 14:47:39 +00:00
Christopher Kohlhoff
355da949d5 Instead of using tie(), set the ios_base::unitbuf flag to force the stream to be flushed after every insertion. Refs #7162
[SVN r79710]
2012-07-23 23:52:15 +00:00
Christopher Kohlhoff
4d9e2461e0 Decorate GCC attribute names with underscores to prevent interaction with user-defined macros. Refs #6415
[SVN r79649]
2012-07-22 06:07:23 +00:00
Christopher Kohlhoff
b38937e17c Add missing #include of <cctype>, needed for some versions of MinGW.
[SVN r79648]
2012-07-22 06:05:26 +00:00
Christopher Kohlhoff
e00679b068 Use gcc's atomic builtins on arm, when available.
[SVN r79647]
2012-07-22 06:04:23 +00:00
Christopher Kohlhoff
7df5c95ca9 Ensure use of __thread keyword is disabled for older Intel compilers.
[SVN r79568]
2012-07-17 00:01:37 +00:00
Christopher Kohlhoff
cb65bde33b Sync version number with release branch.
[SVN r79551]
2012-07-16 06:29:59 +00:00
Christopher Kohlhoff
15b3e9a902 Make strand destruction a no-op, to allow strand objects to be destroyed after their associated io_service has been destroyed.
[SVN r79525]
2012-07-15 04:38:03 +00:00
Christopher Kohlhoff
8162904ea1 Use the __thread keyword extension when compiling with gcc on linux x86.
[SVN r79524]
2012-07-15 04:35:08 +00:00
Christopher Kohlhoff
fa10fb2fff Avoid calling work_finished() if a completion handler creates more work.
[SVN r79523]
2012-07-15 04:30:50 +00:00
Christopher Kohlhoff
8288819a86 Eliminate redundant call to call_stack::contains(this) when dispatching a completion handler.
[SVN r79522]
2012-07-15 04:26:05 +00:00
Christopher Kohlhoff
0736d31291 Add support for some newer versions of glibc which provide the epoll_create1 function but always fail with ENOSYS. Refs #7012
[SVN r79521]
2012-07-15 04:22:28 +00:00
Christopher Kohlhoff
b510b81b70 Use SSE2 load and store fences.
[SVN r79520]
2012-07-15 04:18:37 +00:00
Christopher Kohlhoff
5d4e191a92 Throw exception if SSL engine initialisation fails. Refs #6303
[SVN r79519]
2012-07-15 04:17:06 +00:00
Christopher Kohlhoff
91eea21a78 Fix another regression in buffered_write_stream. Refs #6310
[SVN r79518]
2012-07-15 04:10:59 +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
b7c806fc78 Added lazy registration for EPOLLOUT.
[SVN r78667]
2012-05-26 22:28:34 +00:00
Christopher Kohlhoff
21d2df5acc Eliminate a lock/unlock pair when rescheduling a strand.
[SVN r78666]
2012-05-26 22:25:30 +00:00
Christopher Kohlhoff
69a388f92d Remove trailing whitespace.
[SVN r78665]
2012-05-26 22:23:53 +00:00
Christopher Kohlhoff
70598a8a58 Last version's race-condition-related revert in the epoll_reactor was
incomplete and broke out-of-band handling. Fixed epoll_reactor::start_op so
that it is now exactly the same as the older, working version.


[SVN r78664]
2012-05-26 22:22:46 +00:00
Christopher Kohlhoff
1fe87f03b4 Respect the OPENSSL_NO_ENGINE feature test #define.
[SVN r78663]
2012-05-26 22:20:47 +00:00
Christopher Kohlhoff
4806f0e274 Use correct basic_io_object member functions so that basic_object_handle works with c++11 compilers.
[SVN r78662]
2012-05-26 22:16:14 +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
657c782117 Fix doxygen comments.
[SVN r76507]
2012-01-15 11:29:25 +00:00
Christopher Kohlhoff
be171b6abb Add extra include required for OVERLAPPED struct.
[SVN r76449]
2012-01-13 12:58:52 +00:00
Christopher Kohlhoff
c1a8562cf9 Disable object_handle on Windows CE.
[SVN r76448]
2012-01-13 12:57:59 +00:00
Christopher Kohlhoff
0725446de9 Fix non-paged pool "leak" on Windows when io_service is repeatedly run without anything to do. Refs #6321.
[SVN r76432]
2012-01-12 13:38:17 +00:00
Christopher Kohlhoff
c2d491a4e0 On linux, connect can return EAGAIN in certain circumstances. Remap to another
error so that it doesn't look like a non-blocking operation. Refs #6048.


[SVN r76430]
2012-01-12 12:27:02 +00:00
Christopher Kohlhoff
28fe058750 Fix deadlock on Mac OS X. Refs #6275.
[SVN r76427]
2012-01-12 10:08:15 +00:00
Christopher Kohlhoff
19da914b2c Fix regression in buffered_write_stream. Refs #6310.
[SVN r76426]
2012-01-12 07:42:47 +00:00
Christopher Kohlhoff
a132c47ca6 Fix for NetBSD. Refs #6098.
[SVN r76425]
2012-01-12 07:37:57 +00:00
Christopher Kohlhoff
d649b2acb8 Fix MSVC "performance warning".
[SVN r76424]
2012-01-12 07:30:05 +00:00
Christopher Kohlhoff
30f3e430a7 Update copyright notices.
[SVN r76420]
2012-01-11 23:04:08 +00:00
Christopher Kohlhoff
70cd19f75b Need to enable the basic_handle class when object_handle is supported.
[SVN r76408]
2012-01-11 07:10:06 +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
4badacaace Make number of strand implementations configurable by defining
BOOST_ASIO_STRAND_IMPLEMENTATIONS to the number.

Programs can now define BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION to
switch the allocation of strand implementations to use a round-robin approach
rather than hashing.

Fix potential strand starvation issue that can occur when strand.post() is used.


[SVN r74955]
2011-10-15 23:59:12 +00:00
Christopher Kohlhoff
7e20d34537 Update descriptor state allocation to match approach used in epoll_reactor.
[SVN r74954]
2011-10-15 23:56:21 +00:00
Christopher Kohlhoff
fb588f5c1e Construct interrupter member first to fix exception safety issue. Refs #6006
[SVN r74953]
2011-10-15 23:55:24 +00:00
Christopher Kohlhoff
cc4f30f3b5 Clarify that the read operation ends when the buffer is full. Refs #5999
[SVN r74952]
2011-10-15 23:46:49 +00:00
Christopher Kohlhoff
c974f1088d Various performance improvements:
* Split the task_io_service's run and poll code.

* Use thread-local operation queues in single-threaded use cases (i.e. concurrency_hint is 1) to eliminate a lock/unlock pair.

* Only fence block exit when a handler is being run directly out of the io_service.

* Prefer x86 mfence-based fenced block when available.

* Use a plain ol' long for the atomic_count when all thread support is disabled.

* Allow some epoll_reactor speculative operations to be performed without holding the lock.

* Improve locality of reference by performing an epoll_reactor's I/O operation immediately before the corresponding handler is called. This also improves scalability across CPUs when multiple threads are running the io_service.

* Pass same error_code variable through to each operation's complete() function.

* Optimise creation of and access to the io_service implementation.


[SVN r74826]
2011-10-08 21:58:10 +00:00
Christopher Kohlhoff
1882513c3e Fix error mapping when session is gracefully shut down.
[SVN r74825]
2011-10-08 21:38:43 +00:00
Christopher Kohlhoff
198913776d Initialise all OpenSSL algorithms.
[SVN r74824]
2011-10-08 21:38:08 +00:00
Christopher Kohlhoff
dd7f43285a Specialise operations for buffer sequences that are arrays of exactly two buffers.
[SVN r74823]
2011-10-08 21:36:36 +00:00
Christopher Kohlhoff
e66e5d5fb3 Fix crash due to gcc_x86_fenced_block that shows up when using the Intel C++ compiler. Refs #5763
[SVN r74822]
2011-10-08 21:31:26 +00:00
Christopher Kohlhoff
04b8773fd5 Disable warning due to const qualifier being applied to function type.
[SVN r74821]
2011-10-08 21:28:00 +00:00
Christopher Kohlhoff
8d24d33883 Set size of select fd_set at runtime when using Windows.
[SVN r74820]
2011-10-08 21:25:20 +00:00
Christopher Kohlhoff
21bbcdeae1 Make sure the synchronous null_buffers operations obey the user's non_blocking setting. Refs #5756
[SVN r74818]
2011-10-08 21:15:42 +00:00
Christopher Kohlhoff
35b91b411c Change the SSL buffers sizes so that they're large enough to hold a complete TLS record. Refs #5854
[SVN r74817]
2011-10-08 21:10:56 +00:00
Christopher Kohlhoff
292f6f53c9 Don't read the clock unless the heap is non-empty.
[SVN r74816]
2011-10-08 21:08:39 +00:00
Christopher Kohlhoff
701f7d68ab Explicitly specify the signal() function from the global namespace. Refs #5722
[SVN r74815]
2011-10-08 21:06:38 +00:00
Christopher Kohlhoff
b28a5bfcda Fix compile error in regex overload of async_read_until.hpp. Refs #5688
[SVN r74814]
2011-10-08 21:03:22 +00:00
Christopher Kohlhoff
df4b6cd4d6 Fix for static mutex initialisation.
[SVN r72818]
2011-06-30 13:38:30 +00:00
Christopher Kohlhoff
374c7b62a8 Zero-length reads and writes need to complete immediately.
[SVN r72807]
2011-06-29 23:35:17 +00:00
Christopher Kohlhoff
82cc1578b1 Fix include guard.
[SVN r72806]
2011-06-29 23:32:51 +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
ee9089cea9 * Prevent truncation of some handler tracking output.
* Using directive only needed in write_line() function.


[SVN r72141]
2011-05-24 23:28:14 +00:00
Christopher Kohlhoff
da4617cc90 * Add move constructors and assignment operators to endpoint and address classes.
* Add support for platforms that have no signal support.

* Use using declarations when finding customisation hooks.


[SVN r72024]
2011-05-17 21:46:54 +00:00
Christopher Kohlhoff
9ec95f5fb0 Fix move-related bug in strand implementation. Refs #5515.
[SVN r71738]
2011-05-05 13:22:29 +00:00
Christopher Kohlhoff
64b410b2ca Updated move support.
[SVN r71708]
2011-05-04 00:02:18 +00:00
Christopher Kohlhoff
1a6b11f287 Changes for openssl 1.0.
[SVN r71706]
2011-05-03 23:55:03 +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
9d47d1066b Fix error in doxygen comment. Regenerate documentation.
[SVN r70104]
2011-03-18 02:00:08 +00:00
Christopher Kohlhoff
ad1c100832 New SSL implementation.
[SVN r70096]
2011-03-18 00:25:54 +00:00
Christopher Kohlhoff
77d5583fe3 Add asio::buffer() overloads for std::array.
[SVN r70095]
2011-03-18 00:17:32 +00:00
Christopher Kohlhoff
8bd4e3a589 Remaining changes for asio 1.5.2:
* Added support for C++0x move construction and assignment to sockets, serial
  ports, POSIX descriptors and Windows handles.

* Regenerate documentation.


[SVN r70092]
2011-03-17 23:35:59 +00:00
Christopher Kohlhoff
d5ec01e6cc Don't assume SIGRTMAX is a compile-time constant.
[SVN r69516]
2011-03-03 11:56:32 +00:00
Christopher Kohlhoff
d41d2d15e9 * Add support for the fork() system call. Programs that use fork must call
io_service.notify_fork() at the appropriate times. Two new examples have been
  added showing how to use this feature. Refs #3238, #4162.

* Clean up the handling of errors reported by the close() system call. In
  particular, assume that most operating systems won't have close() fail with
  EWOULDBLOCK, but if it does then set blocking mode and restart the call. If
  any other error occurs we assume the descriptor is closed. Refs #3307.

* EV_ONESHOT seems to cause problems on some versions of Mac OS X, with the
  io_service destructor getting stuck inside the close() system call. Use
  EV_CLEAR instead. Refs #5021.

* Include function name in exception what() messages.

* Fix insufficient initialisers warning with MinGW.

* Make the shutdown_service() member functions private.

* Add archetypes for testing socket option functions.

* Add missing lock in signal_set_service::cancel().

* Fix copy/paste error in SignalHandler example.

* The signal header needs to be included in signal_set_service.hpp so that we
  can use constants like NSIG and SIGRTMAX.

* Don't use Boost.Thread's convenience header. Use the header file that is
  specifically for the boost::thread class instead.


[SVN r69467]
2011-03-02 08:27:32 +00:00
Christopher Kohlhoff
f064021b6d Changes for asio version 1.5.1:
* Added support for signal handling, using a new class called
  signal_set. Programs may add one or more signals to the set, and then
  perform an async_wait() operation. The specified handler will be
  called when one of the signals occurs. The same signal number may
  registered with multiple signal_set objects, however the signal number
  must be used only with Asio.

* Added handler tracking, a new debugging aid. When enabled by defining
  BOOST_ASIO_ENABLE_HANDLER_TRACKING, Asio writes debugging output to
  the standard error stream. The output records asynchronous operations
  and the relationships between their handlers. It may be post-processed
  using the included [^handlerviz.pl] tool to create a visual
  representation of the handlers (requires GraphViz).

* Fixed a bug in asio::streambuf where the consume() function did not
  always update the internal buffer pointers correctly. The problem may
  occur when the asio::streambuf is filled with data using the standard
  C++ member functions such as sputn(). (Note: the problem does not
  manifest when the streambuf is populated by the Asio free functions
  read(), async_read(), read_until() or async_read_until().)

* Fixed a bug on kqueue-based platforms, where reactor read operations
  that return false from their perform() function are not correctly
  re-registered with kqueue.

* Modified the buffers_iterator<> and ip::basic_resolver_iterator
  classes so that the value_type typedefs are non-const byte types.


[SVN r69198]
2011-02-23 01:42:40 +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
20306c3852 Use correct interrupt method when timerfd is not available. Refs #5045
[SVN r68169]
2011-01-15 09:32:13 +00:00
Christopher Kohlhoff
4b019c3d1d Fix out-of-bounds address_v4::broadcast() return value on 64-bit systems.
[SVN r68088]
2011-01-13 09:13:30 +00:00
Christopher Kohlhoff
678d7ff74e Version bump.
[SVN r68087]
2011-01-13 09:09:09 +00:00
Christopher Kohlhoff
b1dced94c8 Update copyright notice.
[SVN r68086]
2011-01-13 08:14:05 +00:00
Bryce Adelstein-Lelbach
8f2012da28 Pathscale 4.0.0's stdlib (rw) has a <streambuf> that doesn't include <iostream>;
added an include to <iostream> here as this file needs it.



[SVN r67851]
2011-01-09 04:47:56 +00:00
Christopher Kohlhoff
3d76a5a994 Fixed a Windows-specific problem where failures from accept() are incorrectly treated as successes. Refs #4859.
[SVN r66613]
2010-11-16 13:16:45 +00:00
Christopher Kohlhoff
60724f91ab MacPorts gcc also defines __APPLE_CC__, but to 1.
[SVN r66398]
2010-11-04 11:40:42 +00:00
Christopher Kohlhoff
ddc92ac35f Target workaround at non-Apple objective-c++ compilers only, as the previous
workaround broke those platforms. Pragmas push_macro and pop_macro are only
available on gcc 4.4 or later, so use plain ol' #define/#undef instead.


[SVN r66289]
2010-10-30 22:45:29 +00:00
Christopher Kohlhoff
84ff434f23 Rename separate compilation header. Refs #4560.
[SVN r66174]
2010-10-25 12:26:06 +00:00
Christopher Kohlhoff
6fd0719fc4 Fix failure in socket_base test on NetBSD.
[SVN r66162]
2010-10-24 13:15:46 +00:00
Christopher Kohlhoff
24dade9009 Fix kqueue_reactor so that it compiles on NetBSD. Refs #4662.
[SVN r66159]
2010-10-24 07:58:23 +00:00
Christopher Kohlhoff
6fa2efadba Fix vector reallocation performance problem. Refs #4780.
[SVN r66158]
2010-10-24 02:06:46 +00:00
Christopher Kohlhoff
b4479ed01e Version check not required.
[SVN r66144]
2010-10-22 12:20:52 +00:00
Christopher Kohlhoff
5ea3ac4f9a Redefine Protocol and id to avoid clashing with Objective-C++ keywords. Refs #4191.
[SVN r66143]
2010-10-22 12:07:36 +00:00
Christopher Kohlhoff
25330ccc52 Fix unused parameter warnings.
[SVN r66075]
2010-10-18 12:27:12 +00:00
Christopher Kohlhoff
b12329f181 Fix so that read operations do not accept const_buffers_1 arguments. Refs #4746.
[SVN r66056]
2010-10-17 21:24:55 +00:00
Christopher Kohlhoff
f939fad2fc Version bump.
[SVN r66035]
2010-10-17 11:33:28 +00:00
Christopher Kohlhoff
99bb1215e2 Pass NULL for servname rather than empty string, as per POSIX. Refs #4690.
[SVN r66022]
2010-10-16 13:15:51 +00:00
Christopher Kohlhoff
056bbee611 Timers with expiry times set more than 5 minutes in the future need the
waitable timer to be periodic. Refs #4745.


[SVN r66020]
2010-10-16 12:59:29 +00:00
Christopher Kohlhoff
da63086d10 Fix Windows build when thread support is disabled. Refs #4680.
[SVN r66018]
2010-10-16 12:39:06 +00:00
Christopher Kohlhoff
e8a268059a Ensure handler arguments are passed as lvalues. Refs #4744.
[SVN r66017]
2010-10-16 12:23:56 +00:00
Christopher Kohlhoff
3518561c26 Always use pselect() on HP-UX, if it is available. Refs #4578.
[SVN r66014]
2010-10-16 11:39:13 +00:00
Christopher Kohlhoff
9a6c377a37 Add support for hardware flow control on QNX. Refs #4625.
[SVN r66010]
2010-10-16 11:04:08 +00:00
Christopher Kohlhoff
4fd6ef14e5 Check return code of InitializeCriticalSectionAndSpinCount. Refs #4574.
[SVN r66009]
2010-10-16 10:01:14 +00:00
Christopher Kohlhoff
37280f03dc Ensure close()/closesocket() failures are correctly propagated. Refs #4573.
[SVN r66008]
2010-10-16 09:47:11 +00:00
Christopher Kohlhoff
09cff6f060 Don't use deprecated system functions. Refs #4672.
[SVN r66007]
2010-10-16 07:24:47 +00:00
Christopher Kohlhoff
2c9c9b021f Use lower-case to keep MinGW cross-compilers happy. Refs #4491.
[SVN r66006]
2010-10-16 07:06:18 +00:00
Christopher Kohlhoff
61bec332e8 Fix a const-correctness issue that prevents valid uses of has_service<> from compiling. Refs #4638.
[SVN r66005]
2010-10-16 06:27:45 +00:00
Christopher Kohlhoff
efa8226a19 Fix the way the kqueue_reactor is interrupted when a new timer is scheduled. Refs #4568.
[SVN r66004]
2010-10-16 05:43:03 +00:00
Christopher Kohlhoff
e117752319 Version bump.
[SVN r63900]
2010-07-11 23:55:34 +00:00
Christopher Kohlhoff
0d86de5a45 Preserve error value.
[SVN r63838]
2010-07-11 04:16:10 +00:00
Christopher Kohlhoff
8832922873 Add macro for disabling fenced blocks.
[SVN r63837]
2010-07-11 04:15:19 +00:00
Christopher Kohlhoff
4bfc2868ab Note that hppa fence is just a placeholder at this time.
[SVN r63836]
2010-07-11 04:12:51 +00:00
Christopher Kohlhoff
2ddb60916c Fence class for hppa.
[SVN r63776]
2010-07-09 13:43:05 +00:00
Christopher Kohlhoff
6e0c4904b4 Add missing parameter.
[SVN r63646]
2010-07-05 07:43:22 +00:00
Christopher Kohlhoff
bd147ea789 Fix unused parameters.
[SVN r63594]
2010-07-04 13:42:41 +00:00
Christopher Kohlhoff
ae04d43d05 Add missing operator+ overload. Refs #4382.
[SVN r63592]
2010-07-04 13:11:14 +00:00
Christopher Kohlhoff
61e36a4a2b Eliminate unnecessary uses of hash_map.
[SVN r63577]
2010-07-04 07:37:42 +00:00
Christopher Kohlhoff
8c5627bc13 Make more tolerant of different platform sdk variants.
[SVN r63576]
2010-07-04 07:28:20 +00:00
Christopher Kohlhoff
5bd06414c5 Fixes in non_blocking_read.
[SVN r63575]
2010-07-04 07:26:36 +00:00
Christopher Kohlhoff
5ae3eae4d5 Add cancellation of reactor operations.
[SVN r63574]
2010-07-04 07:23:27 +00:00
Christopher Kohlhoff
c983fc805e Fix forward declaration.
[SVN r63573]
2010-07-04 07:21:24 +00:00
Christopher Kohlhoff
bf07247104 Fences for arm.
[SVN r63572]
2010-07-04 07:20:18 +00:00
Christopher Kohlhoff
c8146d544f Fences for arm.
[SVN r63571]
2010-07-04 07:19:30 +00:00
Christopher Kohlhoff
7ead504f73 Ensure arguments to handlers are passed as const types.
[SVN r63570]
2010-07-04 06:57:32 +00:00
Christopher Kohlhoff
db6f42e12b Fix handling of empty buffer sequences.
[SVN r62558]
2010-06-08 11:01:57 +00:00
Christopher Kohlhoff
5978853196 Ensure unsigned char is used with isdigit. Refs #4201.
[SVN r62556]
2010-06-08 09:01:39 +00:00
Christopher Kohlhoff
c1d13d05f8 Some changes for Symbian support.
[SVN r62531]
2010-06-07 23:29:05 +00:00
Christopher Kohlhoff
579be49842 Fixes for MSVC 7.1, Borland.
[SVN r62530]
2010-06-07 23:24:28 +00:00
Christopher Kohlhoff
0f5629d445 Reworked implementation MkII
[SVN r62499]
2010-06-07 00:00:45 +00:00
Christopher Kohlhoff
b7bc3ff637 Fix handling of small but non-zero timeouts. Fixes #4205.
[SVN r62497]
2010-06-06 23:28:58 +00:00
Christopher Kohlhoff
33eeb63378 Doc updates.
[SVN r61643]
2010-04-28 12:39:06 +00:00
Christopher Kohlhoff
b59ac3d388 Try using asm-based fenced block for pathscale.
[SVN r61172]
2010-04-10 06:54:34 +00:00
Christopher Kohlhoff
58ca677b0f Try to fix compile errors on various platforms in fenced_block.
[SVN r61010]
2010-04-03 00:29:06 +00:00
Christopher Kohlhoff
03645c054c Add ifdef to allow asio's threading support to be independently disabled.
[SVN r61009]
2010-04-02 22:51:42 +00:00
Christopher Kohlhoff
5dbcf53b17 Fix so that lock is not held while reactor is running.
[SVN r60962]
2010-03-31 12:22:10 +00:00
Christopher Kohlhoff
51ae6ad776 Uncomment ifdef test that was accidentally left commented.
[SVN r60961]
2010-03-31 12:13:47 +00:00
Christopher Kohlhoff
d3a2b42be1 New kqueue reactor implementation using one-shot event registration.
[SVN r60940]
2010-03-30 12:31:51 +00:00
Christopher Kohlhoff
1ea2d5330f Don't perform a speculative read when an out-of-band read is pending.
[SVN r60939]
2010-03-30 12:30:00 +00:00
Christopher Kohlhoff
d02eb70ec9 Don't allow speculative reads when message_out_of_band is specified.
[SVN r60938]
2010-03-30 12:28:22 +00:00
Christopher Kohlhoff
f1debcc472 Document basic_resolver_query's constructor arguments.
[SVN r60921]
2010-03-29 23:51:15 +00:00
Christopher Kohlhoff
399786e737 Fix unused variable warnings.
[SVN r60883]
2010-03-27 23:04:56 +00:00
Christopher Kohlhoff
7b4fabf4e3 Change the resolver implementation to no longer require the typedefs
InternetProtocol::resolver_query and InternetProtocol::resolver_iterator,
as neither typedef is part of the documented InternetProtocol requirements.

The following typedefs are now marked as deprecated:
- ip::icmp::resolver_query
- ip::icmp::resolver_iterator
- ip::tcp::resolver_query
- ip::tcp::resolver_iterator
- ip::udp::resolver_query
- ip::udp::resolver_iterator


[SVN r60882]
2010-03-27 22:22:59 +00:00
Christopher Kohlhoff
d32559c643 Always call ioctl on underlying descriptor when modifying blocking mode. Refs #3307.
[SVN r60869]
2010-03-27 10:54:44 +00:00
Christopher Kohlhoff
3c5fe939c9 Async connect operations using the reactor should not allow speculative
completion.


[SVN r60781]
2010-03-23 01:39:12 +00:00
Christopher Kohlhoff
41bcacc9e2 Fix cancellation in Windows HANDLE backend.
[SVN r60756]
2010-03-22 03:32:56 +00:00
Christopher Kohlhoff
c980da5515 Fix search/replace error in some resolver_query_base enumerators.
[SVN r60743]
2010-03-21 10:54:56 +00:00
Christopher Kohlhoff
73b7b61c61 Fix cancellation.
[SVN r60723]
2010-03-19 23:58:48 +00:00
Christopher Kohlhoff
e95406e8b9 WinCE doesn't provide InitializeCriticalSectionAndSpinCount.
[SVN r60722]
2010-03-19 23:57:50 +00:00
Christopher Kohlhoff
4ab0d73c10 Fix epoll_reactor bug where cancelled operations would complete with a
"success" error_code.


[SVN r60705]
2010-03-19 13:08:04 +00:00
Christopher Kohlhoff
1683a90e86 Fix bug where 0-byte reads were incorrectly passing an eof error_code to the handler. Refs #4023.
[SVN r60689]
2010-03-18 11:08:19 +00:00
Christopher Kohlhoff
96ad484574 Use a bitmask type for the resolver flags, as per the TR2 proposal. This will
prevent implicit conversion from int to flags, allowing the compiler to catch
cases where users incorrectly pass a numeric port number as the service name.


[SVN r60687]
2010-03-18 06:23:38 +00:00
Christopher Kohlhoff
481e0b03d9 Clarify that to_bytes() returns addresses in network byte order. Refs #4005.
[SVN r60683]
2010-03-18 01:54:43 +00:00
Christopher Kohlhoff
8717cac135 Define NOMINMAX for all Windows compilers, not just Cygwin. Users can define
BOOST_ASIO_NO_NOMINMAX to suppress this definition.


[SVN r60681]
2010-03-18 01:32:34 +00:00
Christopher Kohlhoff
96ce1bea3f Reworked implementation.
[SVN r60380]
2010-03-09 12:50:07 +00:00
Christopher Kohlhoff
eecd73a23a Document ordering of handlers in strands. Fix error in streambuf snippet.
[SVN r59104]
2010-01-17 21:48:17 +00:00
Christopher Kohlhoff
d6ac7e4a70 Support platforms that don't define INET6_ADDRSTRLEN. Refs #3743.
[SVN r58793]
2010-01-07 22:18:16 +00:00
Christopher Kohlhoff
dd13ae0801 Disable handler allocation and invocation hooks on g++ 2.x. Refs #3743.
[SVN r58782]
2010-01-06 22:44:48 +00:00
Christopher Kohlhoff
23c3bacde4 Apply fix for reported excessive CPU usage under Solaris. Refs #3670.
[SVN r58762]
2010-01-06 12:36:51 +00:00
Christopher Kohlhoff
b031423afe Disable iostreams-related functionality if BOOST_NO_IOSTREAMS is defined. Refs #3743.
[SVN r58761]
2010-01-06 12:27:05 +00:00
Christopher Kohlhoff
ec92795b73 Use buffer debugging workaround with MSVC 8 only.
[SVN r58740]
2010-01-06 02:38:39 +00:00
Christopher Kohlhoff
fb9262b171 Use sockatmark if SIOCATMARK is not defined. Refs #3743.
[SVN r58705]
2010-01-05 12:50:39 +00:00
Christopher Kohlhoff
a53c811edb Drop back to second_clock if microsec_clock is unavailable. Refs #3743.
[SVN r58704]
2010-01-05 12:20:10 +00:00
Christopher Kohlhoff
05161f352f Include boost/limits.hpp rather than <limits>, to support older compilers.
Refs #3743.


[SVN r58703]
2010-01-05 11:51:41 +00:00
Christopher Kohlhoff
e918b97ec4 Fix Win64 warnings.
[SVN r58671]
2010-01-04 12:33:42 +00:00
Christopher Kohlhoff
cf516b07a5 Only include implementation headers required for each platform.
[SVN r58652]
2010-01-02 21:38:44 +00:00
Christopher Kohlhoff
c37cae6c1c Add a workaround for some broken Windows firewalls that make a socket
appear bound to 0.0.0.0 when it is in fact bound to 127.0.0.1.


[SVN r58651]
2010-01-02 21:37:10 +00:00
Christopher Kohlhoff
51b0750d54 In getaddrinfo emulation, only check the socket type (SOCK_STREAM or SOCK_DGRAM)
if a service name has been specified. This should allow the emulation to work
with raw sockets.


[SVN r58650]
2010-01-02 21:35:33 +00:00
Christopher Kohlhoff
c2f12c99e0 Use a pool of strand implementations to make copying of strands cheaper.
[SVN r58647]
2010-01-02 20:36:59 +00:00
Christopher Kohlhoff
b5688e37a7 Add boost_ prefix to extern "C" thread entry point function. Refs #3809.
[SVN r58630]
2010-01-02 10:30:41 +00:00
Christopher Kohlhoff
6d8d57aaf0 Ensure that kqueue support is enabled for BSD platforms. Refs #3626.
[SVN r58629]
2010-01-02 10:20:12 +00:00
Christopher Kohlhoff
cf8c031f87 Don't block signals while performing system calls, but instead restart the
calls if they are interrupted.


[SVN r58628]
2010-01-02 09:48:01 +00:00
Christopher Kohlhoff
45acb2f756 Use boost::addressof to get the address of handler objects, rather than
applying operator& directly. Refs #2977.


[SVN r58627]
2010-01-02 08:24:12 +00:00
Christopher Kohlhoff
ee7f4cba38 e specific type_traits headers.
[SVN r58625]
2010-01-02 07:16:41 +00:00
Christopher Kohlhoff
b6fbb66440 Windows needs the OVERLAPPED structure to be valid until both the initiating
function call has returned and the completion packet has been delivered.


[SVN r58624]
2010-01-02 06:09:02 +00:00
Christopher Kohlhoff
20a822c591 Update copyright notices.
[SVN r58623]
2010-01-02 01:24:52 +00:00
Christopher Kohlhoff
c901425aa0 Wrap long line.
[SVN r58621]
2010-01-01 23:04:35 +00:00
Hartmut Kaiser
afa4f59dbb Asio: disabled VC workaround for VC2010 beta2 compiler
[SVN r57393]
2009-11-05 00:26:15 +00:00
Christopher Kohlhoff
58ad4eec91 Clarify that deadline_timer uses a UTC-based clock by default.
[SVN r55670]
2009-08-19 22:44:02 +00:00
Christopher Kohlhoff
328b1a37bf Add missing returns for failure cases in write_some_at and read_some_at.
[SVN r55500]
2009-08-10 11:38:00 +00:00
Christopher Kohlhoff
9b5be8f373 Fix bullet list.
[SVN r55059]
2009-07-21 12:20:28 +00:00
Christopher Kohlhoff
e325c6ffe3 Documentation updates.
[SVN r54916]
2009-07-13 03:38:21 +00:00
Christopher Kohlhoff
ab1a6a09ff Fix compile error when using openssl 1.0 beta. Refs #3256.
[SVN r54907]
2009-07-12 08:16:06 +00:00
Christopher Kohlhoff
5cafa35a16 Don't write to /dev/poll descriptor when there are no pending changes.
[SVN r54845]
2009-07-09 22:58:26 +00:00
Christopher Kohlhoff
261c3962c0 Fix task initialisation.
[SVN r54844]
2009-07-09 22:55:26 +00:00
Christopher Kohlhoff
7f27c0a3a7 Check that WINVER is actually defined when using it.
[SVN r54526]
2009-06-30 08:22:03 +00:00
Christopher Kohlhoff
487d4241b2 Don't rehash if the number of buckets hasn't changed.
[SVN r54525]
2009-06-30 08:19:56 +00:00
Christopher Kohlhoff
4f1faaa224 Sync version number with release branch.
[SVN r54501]
2009-06-29 13:52:31 +00:00
Christopher Kohlhoff
eacb3aefde Treat 0-byte reads and writes as no-ops to comply with the documented type
requirements for SyncReadStream, AsyncReadStream, SyncWriteStream and
AsyncWriteStream.


[SVN r54467]
2009-06-28 13:20:17 +00:00
Christopher Kohlhoff
dcb95b393b Use boost::throw_exception() rather than throw keyword to allow asio to be
used when exception support is disabled. Note that the SSL wrappers still
require exception support. Refs #2754.


[SVN r54400]
2009-06-27 07:52:11 +00:00
Christopher Kohlhoff
fd411319a4 Fix various g++ warnings. Ref #1341.
[SVN r54393]
2009-06-27 07:07:40 +00:00
Christopher Kohlhoff
f36045ab00 Fix custom memory allocation for timers. Ref #3107.
[SVN r54392]
2009-06-27 05:24:16 +00:00
Christopher Kohlhoff
2e4474765b Fix failures reported when the tests are built with _GLIBCXX_DEBUG. Ref #3098.
[SVN r54390]
2009-06-27 02:17:49 +00:00
Christopher Kohlhoff
3ec5f6ed71 Remove a local variable that was hiding the ec parameter and preventing
error codes from being correctly propagated. Ref #3216.


[SVN r54377]
2009-06-26 13:55:24 +00:00
Christopher Kohlhoff
486c8e7931 Fix bug in hash resize. Ref #3095.
[SVN r54376]
2009-06-26 13:35:04 +00:00
Christopher Kohlhoff
c48aa55815 Don't include termios.h unless BOOST_ASIO_HAS_SERIAL_PORT is defined.
Fixes #2917.


[SVN r52478]
2009-04-19 04:15:17 +00:00
Christopher Kohlhoff
1f9ec4a8da POSIX allows successful system calls to modify errno, so always clear the
error_code if the result indicates success. Fixes #2953.


[SVN r52465]
2009-04-18 13:27:53 +00:00
Christopher Kohlhoff
b79f9a65cd Specifically handle the case when an overlapped ReadFile call fails with
ERROR_MORE_DATA. This enables a hack where a windows::stream_handle can be
used with a message-oriented named pipe.


[SVN r52419]
2009-04-16 12:31:27 +00:00
Christopher Kohlhoff
21f70c436b Fix incompatibility between asio and ncurses.h due to the latter defining
a macro called "timeout". Fixes #2156.


[SVN r52412]
2009-04-16 03:27:58 +00:00
Christopher Kohlhoff
0218c0b06b Fix implementation of io_control() so that it adheres to the type
requirements for IoControlCommand. Fixes #2820.


[SVN r52294]
2009-04-09 12:16:02 +00:00
Christopher Kohlhoff
6408f73a8f Prevent memory leaks when an async SSL operation's completion handler throws.
Fixes #2910.


[SVN r52293]
2009-04-09 12:12:50 +00:00
Christopher Kohlhoff
ab2dd63bbe Implement automatic resizing of the bucket array in the internal hash maps.
This is to improve performance for very large numbers of asynchronous
operations and also to reduce memory usage for very small numbers. A new
macro BOOST_ASIO_HASH_MAP_BUCKETS may be used to tweak the sizes used for the
bucket arrays.


[SVN r52292]
2009-04-09 12:09:16 +00:00
Christopher Kohlhoff
5816e90bdb As a performance optimisation, add an explicit check for an empty vector of
timer queues.


[SVN r52291]
2009-04-09 12:04:39 +00:00
Christopher Kohlhoff
28e59ef71c Fix some warnings that occur with MSVC at warning level 4. Fixes #2828.
[SVN r52290]
2009-04-09 12:03:01 +00:00
Christopher Kohlhoff
59a8830f00 Correct documentation of read, read_at, write and write_at functions to
match new CompletionCondition concept. Fixes #2871.


[SVN r52289]
2009-04-09 12:00:36 +00:00
Christopher Kohlhoff
2c6b839435 Prevent locales from affecting the formatting of endpoints. Fixes #2682.
[SVN r52288]
2009-04-09 11:50:42 +00:00
Christopher Kohlhoff
6ce058b229 Update asio version number.
[SVN r50964]
2009-02-02 09:37:10 +00:00
Christopher Kohlhoff
3d9eada294 Use the workaround syntax for specifying a return type with boost::bind.
Needed for the SSL support to work on some older compilers (in particular,
g++ 3.4.5 as used with MinGW).


[SVN r50963]
2009-02-02 09:36:11 +00:00
Christopher Kohlhoff
d7a448832d Use a pipe if eventfd is not supported at runtime. Fixes #2683.
[SVN r50961]
2009-02-02 06:18:59 +00:00
Christopher Kohlhoff
82ed5cb275 Clear the last error following a successful Windows API call, since some
socket providers may leave last error set even when the call succeeds.


[SVN r50949]
2009-02-01 13:25:05 +00:00
Christopher Kohlhoff
774b96f4b5 Add include of <cstring> to fix a compile error on Solaris 10. Fixes #2607.
[SVN r50948]
2009-02-01 12:50:08 +00:00
Christopher Kohlhoff
d53f078c45 Ensure arguments to windows::overlapped_ptr::complete() are passed through to
the completion handler. Fixes #2614.


[SVN r50947]
2009-02-01 12:41:01 +00:00
Christopher Kohlhoff
0d15139621 Suppress unused result warning. Fixes #2534.
[SVN r50946]
2009-02-01 12:28:12 +00:00
Christopher Kohlhoff
1a99da8a0b Improve warning message when _WIN32_WINNT is not correctly defined. Fixes #2541.
[SVN r50945]
2009-02-01 11:57:01 +00:00
Christopher Kohlhoff
94696dfc48 Use correct size for IP_MULTICAST_LOOP option on QNX. Fixes #2530.
[SVN r50944]
2009-02-01 11:42:09 +00:00
Christopher Kohlhoff
9d8581df70 Add more documentation for asio::streambuf.
[SVN r49497]
2008-10-31 01:09:45 +00:00
Christopher Kohlhoff
0c1aea1ebf Fix scoped_ptr usage to work with Sun Studio 11.
[SVN r49484]
2008-10-29 13:00:24 +00:00
Christopher Kohlhoff
96fcff70f2 Fix problem in read_until's match_condition handling when the delimiter
lies at the end of the data.


[SVN r49482]
2008-10-29 12:49:05 +00:00
Christopher Kohlhoff
f2ae35573e Reduce memory usage by doing lazy initialisation of the io_service's reactor.
[SVN r49203]
2008-10-09 06:39:05 +00:00
Christopher Kohlhoff
a64e08daf8 Make the service_registry's usage of typeid work when the default gcc
linker visibility is set to hidden.


[SVN r49202]
2008-10-09 06:34:48 +00:00
Christopher Kohlhoff
b06aeaea60 Only use TerminateThread when explicitly requested by the user by calling
asio::detail:🧵:set_terminate_threads(true). This fixes a memory leak
that may occur with internally created threads.


[SVN r49201]
2008-10-09 06:33:34 +00:00
Christopher Kohlhoff
70ced27ea0 Fix basic_socket_streambuf to work with Protocol objects that don't
provide a resolver.


[SVN r49199]
2008-10-09 06:31:01 +00:00
Christopher Kohlhoff
67a930a268 Ensure the streambuf's egptr() is kept in sync the pptr(). Use std::memmove
rather than std::rotate to minimise data copying. Avoid unnecessary resizes
of the underlying vector.


[SVN r49198]
2008-10-09 06:30:16 +00:00
Christopher Kohlhoff
15b7cb1e8a Merge codegear changes from non-boost version of asio.
[SVN r49197]
2008-10-09 06:28:39 +00:00
Christopher Kohlhoff
d67d33cd9b Add missing bounds checks as specified in TR2 proposal.
[SVN r49195]
2008-10-09 06:22:58 +00:00
Nicola Musatti
32da68bc8e Patch from Ticket #2372
[SVN r49155]
2008-10-06 21:46:14 +00:00
Christopher Kohlhoff
7d25f1c393 Clarify which resolve functions perform forward or reverse resolution.
[SVN r48715]
2008-09-11 00:05:57 +00:00
Christopher Kohlhoff
a746a264d3 Handle SSL library errors.
[SVN r48686]
2008-09-09 13:02:22 +00:00
Christopher Kohlhoff
557ca7cebf Version bump.
[SVN r48685]
2008-09-09 13:01:16 +00:00
Christopher Kohlhoff
68b4f9d710 Update completion_condition documentation to match new signature.
[SVN r48561]
2008-09-03 09:08:04 +00:00
Christopher Kohlhoff
295d977d78 Explicitly specify return type with bind to keep some compilers happy.
[SVN r48560]
2008-09-03 09:06:10 +00:00
Christopher Kohlhoff
a2af9824d6 Add a workaround for a possible gcc 4.3 optimiser bug.
[SVN r48559]
2008-09-03 08:57:48 +00:00
Christopher Kohlhoff
76bf08631f Oops, changeset 48535 accidentally reverted 48527's fix.
[SVN r48558]
2008-09-03 08:56:43 +00:00
Christopher Kohlhoff
aea347d0a7 Add const overloads of the lowest_layer member functions.
[SVN r48535]
2008-09-02 11:34:18 +00:00
Christopher Kohlhoff
f5caaa00d2 Fix to compile with MSVC 7.1.
[SVN r48527]
2008-09-02 08:46:46 +00:00
Christopher Kohlhoff
687fe8806f Use templates to handle iovec structures that have an iov_base member of
type char*.


[SVN r48525]
2008-09-01 23:05:05 +00:00
Christopher Kohlhoff
c60ebedd28 Add support for using an eventfd descriptor on linux to interrupt a blocked
epoll/select reactor.


[SVN r48524]
2008-09-01 23:04:35 +00:00
Christopher Kohlhoff
4696ee9033 Add class to allow use of arbitrary Windows overlapped I/O operations.
[SVN r48495]
2008-08-31 11:38:52 +00:00
Christopher Kohlhoff
7176a41d0d Refactor reactive socket implementation so that synchronous read, write,
accept and connect operations don't modify data associated with the socket.


[SVN r48491]
2008-08-31 09:01:59 +00:00
Christopher Kohlhoff
bb6bfd4b5a Change the CompletionCondition concept so that:
- It is now evaluated before the first call to the underlying
  *_some() operation, as well as after every operation.
- The return value is a number of bytes, which indicates the maximum
  length to be transferred on the subsequent *_some() operation. If
  the return value is 0 then the composed operation completes.

Add missing unit tests for read_at and write_at.


[SVN r48418]
2008-08-28 12:11:47 +00:00
Christopher Kohlhoff
05bf3b8195 Fix duplicate variable warning. Use get_io_service() rather than
deprecated io_service() function.


[SVN r48416]
2008-08-28 12:06:42 +00:00
Christopher Kohlhoff
94292f1605 Fix duplicate variable warning.
[SVN r48415]
2008-08-28 12:04:21 +00:00
Christopher Kohlhoff
7387044863 Fix uninitialised event handles in asio::detail::thread in external mode.
[SVN r48414]
2008-08-28 12:03:46 +00:00
Christopher Kohlhoff
302ca4f79d Update version to match release.
[SVN r48410]
2008-08-28 09:04:31 +00:00
Christopher Kohlhoff
8b4057a004 Include CREAD and CLOCAL in the default flags for serial ports.
[SVN r48039]
2008-08-09 01:47:11 +00:00
Christopher Kohlhoff
a81db41dbc QNX defines AI_V4MAPPED, AI_ALL and AI_ADDRCONFIG but does not implement them.
[SVN r48033]
2008-08-08 14:49:23 +00:00
Christopher Kohlhoff
0b693c585c Fix memory leak in use_tmp_dh_file().
[SVN r48032]
2008-08-08 14:48:24 +00:00
Christopher Kohlhoff
71d47ca98c Fix a tight spin on epoll (or /dev/poll) that occurs when the EPOLLERR and
EPOLLHUP events are reported for a descriptor and there are no pending
operations.


[SVN r48031]
2008-08-08 14:47:58 +00:00
Christopher Kohlhoff
2d79a40ae6 Correct an array bounds error in the treatment of paths for UNIX domain sockets.
Fixes #2120.


[SVN r47673]
2008-07-22 08:26:35 +00:00
Christopher Kohlhoff
285f3e5246 Fix SSL thread ID function to work correctly on 64-bit Windows.
[SVN r47218]
2008-07-08 12:31:48 +00:00
Christopher Kohlhoff
c8899c13a0 POSIX platforms are not required to define IOV_MAX, so if it's not
available default to the stipulated minimum of 16.


[SVN r47217]
2008-07-08 12:30:49 +00:00
Christopher Kohlhoff
479a3abd98 Version bump.
[SVN r47014]
2008-07-02 22:52:22 +00:00
Christopher Kohlhoff
e14e831413 Clarify behaviour of read_until/async_read_until with respect to leftover
data in the streambuf. Use separate brief descriptions for function groups.
Add some extra notes to the io_service documentation.


[SVN r46950]
2008-07-01 12:14:57 +00:00
Christopher Kohlhoff
4123435aa2 Improve buffer() documentation. Fix vector overloads to match TR2 proposal.
[SVN r46949]
2008-07-01 12:13:51 +00:00
Christopher Kohlhoff
e8c7f33c05 Fix name of parameter as referred to in documentation.
[SVN r46945]
2008-07-01 11:53:54 +00:00
Christopher Kohlhoff
39f9567e78 Fix documentation on behaviour when a connect operation fails.
[SVN r46944]
2008-07-01 11:52:54 +00:00
Christopher Kohlhoff
03fc0e7dd6 One more check needed for BSD serial port extensions.
[SVN r46535]
2008-06-20 00:25:50 +00:00