2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-27 06:32:08 +00:00
Commit Graph

76 Commits

Author SHA1 Message Date
Christopher Kohlhoff
d499517905 Remove files left behind after merge.
[SVN r84397]
2013-05-21 00:20:50 +00:00
Christopher Kohlhoff
603397befb Merge from trunk.
------------------------------------------------------------------------
r84301 | chris_kohlhoff | 2013-05-17 07:34:54 +1000 (Fri, 17 May 2013) | 2 lines

Enable handler type requirements static_assert on clang.

------------------------------------------------------------------------
r84308 | chris_kohlhoff | 2013-05-17 09:26:04 +1000 (Fri, 17 May 2013) | 3 lines

Add new traits classes, handler_type and async_result, that allow
the customisation of the return type of an initiating function.

------------------------------------------------------------------------
r84311 | chris_kohlhoff | 2013-05-17 11:38:47 +1000 (Fri, 17 May 2013) | 81 lines

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);

------------------------------------------------------------------------
r84312 | chris_kohlhoff | 2013-05-17 12:25:10 +1000 (Fri, 17 May 2013) | 4 lines

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.

------------------------------------------------------------------------
r84313 | chris_kohlhoff | 2013-05-17 12:35:08 +1000 (Fri, 17 May 2013) | 26 lines

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.

------------------------------------------------------------------------
r84314 | chris_kohlhoff | 2013-05-17 13:07:51 +1000 (Fri, 17 May 2013) | 27 lines

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.

------------------------------------------------------------------------
r84315 | chris_kohlhoff | 2013-05-17 20:06:50 +1000 (Fri, 17 May 2013) | 3 lines

Partially decouple Asio from other boost components via an extra level
of indirection.

------------------------------------------------------------------------
r84316 | chris_kohlhoff | 2013-05-17 20:15:21 +1000 (Fri, 17 May 2013) | 2 lines

Minor cleanup.

------------------------------------------------------------------------
r84319 | chris_kohlhoff | 2013-05-17 20:52:08 +1000 (Fri, 17 May 2013) | 9 lines

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.

------------------------------------------------------------------------
r84320 | chris_kohlhoff | 2013-05-17 20:57:02 +1000 (Fri, 17 May 2013) | 6 lines

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.

------------------------------------------------------------------------
r84322 | chris_kohlhoff | 2013-05-17 21:00:49 +1000 (Fri, 17 May 2013) | 5 lines

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.

------------------------------------------------------------------------
r84325 | chris_kohlhoff | 2013-05-17 21:04:11 +1000 (Fri, 17 May 2013) | 9 lines

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.

------------------------------------------------------------------------
r84345 | chris_kohlhoff | 2013-05-18 21:24:59 +1000 (Sat, 18 May 2013) | 2 lines

Update copyright notices.

------------------------------------------------------------------------
r84346 | chris_kohlhoff | 2013-05-18 21:54:59 +1000 (Sat, 18 May 2013) | 3 lines

Remove the stackless coroutine class and macros from the HTTP server 4
example, and instead make them a part of Asio's documented interface.

------------------------------------------------------------------------
r84347 | chris_kohlhoff | 2013-05-18 22:01:59 +1000 (Sat, 18 May 2013) | 4 lines

Fix basic_waitable_timer's underlying implementation so that it can
handle any time_point value without overflowing the intermediate
duration objects.

------------------------------------------------------------------------
r84348 | chris_kohlhoff | 2013-05-18 22:07:00 +1000 (Sat, 18 May 2013) | 3 lines

Fix a problem with lost thread wakeups that can occur when making
concurrent calls to run() and poll() on the same io_service object.

------------------------------------------------------------------------
r84349 | chris_kohlhoff | 2013-05-18 22:13:17 +1000 (Sat, 18 May 2013) | 3 lines

Fix implementation of asynchronous connect operation so that it can cope
with spurious readiness notifications from the reactor.

------------------------------------------------------------------------
r84361 | chris_kohlhoff | 2013-05-19 07:56:31 +1000 (Sun, 19 May 2013) | 1 line

Remove some trailing spaces and fix another copyright notice.

------------------------------------------------------------------------
r84363 | chris_kohlhoff | 2013-05-19 14:55:11 +1000 (Sun, 19 May 2013) | 53 lines

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 r84388]
2013-05-20 12:32:20 +00:00
Christopher Kohlhoff
719d65a805 Merge from trunk:
* Fix some 64-to-32-bit conversion warnings. Fixes #7459

* Fix typos in comments. Fixes #7761

* Fix error in example embedded in basic_socket::get_option's documentation. Fixes #7562

* Use long rather than int for SSL_CTX options, to match OpenSSL. Fixes #7209

* Use _snwprintf to address a compile error due to the changed swprintf signature in recent versions of MinGW. Fixes #7373

* Fix deadlock that can occur on Windows when shutting down a pool of io_service threads due to running out of work. Fixes #7552

* Enable noexcept qualifier for error categories. Fixes #7797

* Treat errors from accept as non-fatal. Fixes #7488

* Add a small block recycling optimisation.

* Version bump.

* Regenerate documentation.


[SVN r82290]
2012-12-30 23:17:13 +00:00
Christopher Kohlhoff
bb38d425fb Merge from trunk:
* Chrono support.

* Added object_handle support.

* Need to enable the basic_handle class when object_handle is supported.

* Update copyright notices.

* Fix MSVC "performance warning".

* Fix for NetBSD. Fixes #6098.

* Fix regression in buffered_write_stream. Fixes #6310.

* Fix deadlock on Mac OS X. Fixes #6275.

* On linux, connect can return EAGAIN in certain circumstances. Remap to another
  error so that it doesn't look like a non-blocking operation. Fixes #6048.

* Fix non-paged pool "leak" on Windows when io_service is repeatedly run without anything to do. Fixes #6321.

* Disable object_handle on Windows CE.

* Add extra include required for OVERLAPPED struct.

* Fix doxygen comments.

* Update documentation.

* Add missing class.

* Update copyright year.


[SVN r76516]
2012-01-15 13:46:25 +00:00
Christopher Kohlhoff
77dec8e703 Merge from trunk...
Fix compile error in regex overload of async_read_until.hpp. Fixes #5688

Explicitly specify the signal() function from the global namespace. Fixes #5722

Don't read the clock unless the heap is non-empty.

Change the SSL buffers sizes so that they're large enough to hold a complete TLS record. Fixes #5854

Make sure the synchronous null_buffers operations obey the user's non_blocking setting. Fixes #5756

Set size of select fd_set at runtime when using Windows.

Disable warning due to const qualifier being applied to function type.

Fix crash due to gcc_x86_fenced_block that shows up when using the Intel C++ compiler. Fixes #5763

Specialise operations for buffer sequences that are arrays of exactly two buffers.

Initialise all OpenSSL algorithms.

Fix error mapping when session is gracefully shut down.

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.

Remove unused state in HTTP server examples.

Add latency test programs.


[SVN r74863]
2011-10-09 21:59:57 +00:00
Christopher Kohlhoff
b91e7a6f65 Merge asio from trunk.
[SVN r72428]
2011-06-05 23:21:43 +00:00
Christopher Kohlhoff
28ab37a23e Merge from trunk:
* Update copyright notice.

* Version bump.

* Fix out-of-bounds address_v4::broadcast() return value on 64-bit systems.

* Use correct interrupt method when timerfd is not available. Fixes #5045


[SVN r68200]
2011-01-17 04:28:16 +00:00
Christopher Kohlhoff
760f58b6ca Merged from trunk.
........
  r63568 | chris_kohlhoff | 2010-07-04 16:49:18 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Fix coroutine macros to work with MSVC's edit-and-continue debug settings.
........
  r63569 | chris_kohlhoff | 2010-07-04 16:53:57 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Reworked timeout examples.
........
  r63570 | chris_kohlhoff | 2010-07-04 16:57:32 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Ensure arguments to handlers are passed as const types.
........
  r63571 | chris_kohlhoff | 2010-07-04 17:19:30 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Fences for arm.
........
  r63572 | chris_kohlhoff | 2010-07-04 17:20:18 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Fences for arm.
........
  r63573 | chris_kohlhoff | 2010-07-04 17:21:24 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Fix forward declaration.
........
  r63574 | chris_kohlhoff | 2010-07-04 17:23:27 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Add cancellation of reactor operations.
........
  r63575 | chris_kohlhoff | 2010-07-04 17:26:36 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Fixes in non_blocking_read.
........
  r63576 | chris_kohlhoff | 2010-07-04 17:28:20 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Make more tolerant of different platform sdk variants.
........
  r63577 | chris_kohlhoff | 2010-07-04 17:37:42 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Eliminate unnecessary uses of hash_map.
........
  r63578 | chris_kohlhoff | 2010-07-04 17:43:23 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Point docs at new timeout examples.
........
  r63592 | chris_kohlhoff | 2010-07-04 23:11:14 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Add missing operator+ overload. Fixes #4382.
........
  r63594 | chris_kohlhoff | 2010-07-04 23:42:41 +1000 (Sun, 04 Jul 2010) | 2 lines
  
  Fix unused parameters.
........
  r63646 | chris_kohlhoff | 2010-07-05 17:43:22 +1000 (Mon, 05 Jul 2010) | 2 lines
  
  Add missing parameter.
........


[SVN r63682]
2010-07-06 04:49:47 +00:00
Christopher Kohlhoff
a70528c9be Merge from trunk.
........
  r62497 | chris_kohlhoff | 2010-06-07 09:28:58 +1000 (Mon, 07 Jun 2010) | 2 lines
  
  Fix handling of small but non-zero timeouts. Fixes #4205.
........
  r62499 | chris_kohlhoff | 2010-06-07 10:00:45 +1000 (Mon, 07 Jun 2010) | 2 lines
  
  Reworked implementation MkII.
  Also fixes #4170.
........
  r62530 | chris_kohlhoff | 2010-06-08 09:24:28 +1000 (Tue, 08 Jun 2010) | 2 lines
  
  Fixes for MSVC 7.1, Borland.
........
  r62531 | chris_kohlhoff | 2010-06-08 09:29:05 +1000 (Tue, 08 Jun 2010) | 2 lines
  
  Some changes for Symbian support.
........
  r62549 | chris_kohlhoff | 2010-06-08 14:27:26 +1000 (Tue, 08 Jun 2010) | 2 lines
  
  Fix typo in tutorial. Fixes #4252.
........
  r62556 | chris_kohlhoff | 2010-06-08 19:01:39 +1000 (Tue, 08 Jun 2010) | 2 lines
  
  Ensure unsigned char is used with isdigit. Fixes #4201.
........
  r62558 | chris_kohlhoff | 2010-06-08 21:01:57 +1000 (Tue, 08 Jun 2010) | 2 lines
  
  Fix handling of empty buffer sequences.
........


[SVN r62644]
2010-06-09 09:40:46 +00:00
Christopher Kohlhoff
0f5629d445 Reworked implementation MkII
[SVN r62499]
2010-06-07 00:00:45 +00:00
Christopher Kohlhoff
de9a23e228 Add note to examples on how to limit asio::streambuf growth. Fixes #3370.
[SVN r60686]
2010-03-18 02:21:32 +00:00
Christopher Kohlhoff
3f3c9aefa1 Add note to examples on how to limit asio::streambuf growth.
[SVN r60685]
2010-03-18 02:15:23 +00:00
Christopher Kohlhoff
b94132b6b9 Merge doc and example changes from trunk.
........
  r58900 | chris_kohlhoff | 2010-01-11 23:22:33 +1100 (Mon, 11 Jan 2010) | 2 lines
  
  Add HTTP Server 4 example.
........
  r59103 | chris_kohlhoff | 2010-01-18 08:42:36 +1100 (Mon, 18 Jan 2010) | 2 lines
  
  Add coroutine::is_complete() and support for "yield break;".
........
  r59104 | chris_kohlhoff | 2010-01-18 08:48:17 +1100 (Mon, 18 Jan 2010) | 2 lines
  
  Document ordering of handlers in strands. Fix error in streambuf snippet.
........
  r59106 | chris_kohlhoff | 2010-01-18 09:21:21 +1100 (Mon, 18 Jan 2010) | 2 lines
  
  Update revision history.
........


[SVN r59110]
2010-01-18 02:35:32 +00:00
Christopher Kohlhoff
a7710aa4ec Add coroutine::is_complete() and support for "yield break;".
[SVN r59103]
2010-01-17 21:42:36 +00:00
Christopher Kohlhoff
5462e44fd2 Add HTTP Server 4 example.
[SVN r58900]
2010-01-11 12:22:33 +00:00
Christopher Kohlhoff
c2c1f2a507 Merge from trunk. Fixes #3743, #3670, #3822.
........
  r58670 | chris_kohlhoff | 2010-01-04 23:33:04 +1100 (Mon, 04 Jan 2010) | 2 lines
  
  Fix example to compile with MSVC 10 beta 2.
........
  r58671 | chris_kohlhoff | 2010-01-04 23:33:42 +1100 (Mon, 04 Jan 2010) | 2 lines
  
  Fix Win64 warnings.
........
  r58703 | chris_kohlhoff | 2010-01-05 22:51:41 +1100 (Tue, 05 Jan 2010) | 3 lines
  
  Include boost/limits.hpp rather than <limits>, to support older compilers.
  Refs #3743.
........
  r58704 | chris_kohlhoff | 2010-01-05 23:20:10 +1100 (Tue, 05 Jan 2010) | 2 lines
  
  Drop back to second_clock if microsec_clock is unavailable. Refs #3743.
........
  r58705 | chris_kohlhoff | 2010-01-05 23:50:39 +1100 (Tue, 05 Jan 2010) | 2 lines
  
  Use sockatmark if SIOCATMARK is not defined. Refs #3743.
........
  r58740 | chris_kohlhoff | 2010-01-06 13:38:39 +1100 (Wed, 06 Jan 2010) | 2 lines
  
  Use buffer debugging workaround with MSVC 8 only.
........
  r58761 | chris_kohlhoff | 2010-01-06 23:27:05 +1100 (Wed, 06 Jan 2010) | 2 lines
  
  Disable iostreams-related functionality if BOOST_NO_IOSTREAMS is defined. Refs #3743.
........
  r58762 | chris_kohlhoff | 2010-01-06 23:36:51 +1100 (Wed, 06 Jan 2010) | 2 lines
  
  Apply fix for reported excessive CPU usage under Solaris. Refs #3670.
........
  r58782 | chris_kohlhoff | 2010-01-07 09:44:48 +1100 (Thu, 07 Jan 2010) | 2 lines
  
  Disable handler allocation and invocation hooks on g++ 2.x. Refs #3743.
........
  r58793 | chris_kohlhoff | 2010-01-08 09:18:16 +1100 (Fri, 08 Jan 2010) | 2 lines
  
  Support platforms that don't define INET6_ADDRSTRLEN. Refs #3743.
........


[SVN r58883]
2010-01-11 02:34:00 +00:00
Christopher Kohlhoff
f6df78b3dc Fix example to compile with MSVC 10 beta 2.
[SVN r58670]
2010-01-04 12:33:04 +00:00
Christopher Kohlhoff
e97ac69ad8 Merge from trunk.
........
  r57393 | hkaiser | 2009-11-05 11:26:15 +1100 (Thu, 05 Nov 2009) | 1 line
  
  Asio: disabled VC workaround for VC2010 beta2 compiler. Fixes #3796.
........
  r58621 | chris_kohlhoff | 2010-01-02 10:04:35 +1100 (Sat, 02 Jan 2010) | 2 lines
  
  Wrap long line.
........
  r58624 | chris_kohlhoff | 2010-01-02 17:09:02 +1100 (Sat, 02 Jan 2010) | 3 lines
  
  Windows needs the OVERLAPPED structure to be valid until both the initiating
  function call has returned and the completion packet has been delivered.
........
  r58625 | chris_kohlhoff | 2010-01-02 18:16:41 +1100 (Sat, 02 Jan 2010) | 2 lines
  
  Use specific type_traits headers.
........
  r58626 | chris_kohlhoff | 2010-01-02 18:18:09 +1100 (Sat, 02 Jan 2010) | 2 lines
  
  Include specific headers in unit tests rather than the convenience header asio.hpp.
........
  r58627 | chris_kohlhoff | 2010-01-02 19:24:12 +1100 (Sat, 02 Jan 2010) | 3 lines
  
  Use boost::addressof to get the address of handler objects, rather than
  applying operator& directly. Fixes #2977.
........
  r58628 | chris_kohlhoff | 2010-01-02 20:48:01 +1100 (Sat, 02 Jan 2010) | 3 lines
  
  Don't block signals while performing system calls, but instead restart the
  calls if they are interrupted.
........
  r58629 | chris_kohlhoff | 2010-01-02 21:20:12 +1100 (Sat, 02 Jan 2010) | 2 lines
  
  Ensure that kqueue support is enabled for BSD platforms. Fixes #3626.
........
  r58630 | chris_kohlhoff | 2010-01-02 21:30:41 +1100 (Sat, 02 Jan 2010) | 2 lines
  
  Add boost_ prefix to extern "C" thread entry point function. Fixes #3809.
........
  r58647 | chris_kohlhoff | 2010-01-03 07:36:59 +1100 (Sun, 03 Jan 2010) | 2 lines
  
  Use a pool of strand implementations to make copying of strands cheaper.
........
  r58650 | chris_kohlhoff | 2010-01-03 08:35:33 +1100 (Sun, 03 Jan 2010) | 4 lines
  
  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.
........
  r58651 | chris_kohlhoff | 2010-01-03 08:37:10 +1100 (Sun, 03 Jan 2010) | 3 lines
  
  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.
........
  r58652 | chris_kohlhoff | 2010-01-03 08:38:44 +1100 (Sun, 03 Jan 2010) | 2 lines
  
  Only include implementation headers required for each platform.
........


[SVN r58669]
2010-01-04 11:55:09 +00:00
Christopher Kohlhoff
df91035ff5 Update copyright notices.
[SVN r58666]
2010-01-04 09:36:00 +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
20a822c591 Update copyright notices.
[SVN r58623]
2010-01-02 01:24:52 +00:00
Christopher Kohlhoff
13322b3c3b Add ping example.
[SVN r54767]
2009-07-07 12:37:15 +00:00
Christopher Kohlhoff
fd411319a4 Fix various g++ warnings. Ref #1341.
[SVN r54393]
2009-06-27 07:07:40 +00:00
Christopher Kohlhoff
0d70590780 Add missing #include <iostream>.
[SVN r51006]
2009-02-04 06:46:58 +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
6e64678759 Add example showing use of local::stream_protocol::iostream.
[SVN r49200]
2008-10-09 06:32:00 +00:00
Christopher Kohlhoff
8726d4169c Fix error in comment.
[SVN r48526]
2008-09-01 23:07:29 +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
4a357c7fa3 Add more UNIX domain socket examples.
[SVN r47261]
2008-07-09 12:00:56 +00:00
Christopher Kohlhoff
aa76939ff4 Add example showing how to use UNIX domain sockets with connect_pair().
[SVN r47249]
2008-07-08 22:54:38 +00:00
Christopher Kohlhoff
3102715354 Add missing copyright notices.
[SVN r46766]
2008-06-27 05:38:16 +00:00
Christopher Kohlhoff
888b36fa55 Add porthopper example to demonstrate applications that mix synchronous and
asynchronous operations.


[SVN r44678]
2008-04-21 05:43:42 +00:00
Christopher Kohlhoff
a277af13a5 Add a special null_buffers type that allows read and write operations to
be used to indicate the socket's readiness to read or write without
blocking.


[SVN r44673]
2008-04-21 04:02:37 +00:00
Christopher Kohlhoff
17ef45244b Enhance example to make it clear that invocation hooking can be used with
asynchronous operations.


[SVN r44665]
2008-04-21 01:36:28 +00:00
Christopher Kohlhoff
02e47999fa Update copyright notices.
[SVN r43473]
2008-03-03 14:13:01 +00:00
Christopher Kohlhoff
f99a3cb814 Update copyright notices.
[SVN r43472]
2008-03-03 14:05:35 +00:00
Christopher Kohlhoff
ff29c1bcfb Only define _XOPEN_SOURCE_EXTENDED when building with gcc on HP-UX.
[SVN r43302]
2008-02-18 13:33:23 +00:00
Christopher Kohlhoff
1a1f24c49f Fix printing of error messages.
[SVN r43301]
2008-02-18 13:31:26 +00:00
Christopher Kohlhoff
86dc84f36d Need to define _XOPEN_SOURCE_EXTENDED when compiling for HP-UX.
[SVN r43221]
2008-02-11 13:59:44 +00:00
Christopher Kohlhoff
2e343266ab Fix concept name in comment.
[SVN r42750]
2008-01-14 13:13:35 +00:00
Christopher Kohlhoff
09665bffa4 Ensure asio header comes before boost.thread header.
[SVN r41870]
2007-12-08 14:03:40 +00:00
Christopher Kohlhoff
811d967f52 Add get_io_service() synonym for io_service() to match TR2 proposal.
[SVN r40176]
2007-10-19 08:09:55 +00:00
Christopher Kohlhoff
5af39ab4ef Make Windows XP the default target Windows version as the latest Windows
SDK doesn't support IPv6 for Windows 2000 targets.


[SVN r40108]
2007-10-17 07:58:38 +00:00
Christopher Kohlhoff
7825a45960 Add missing "lib ipv6 ;" that's needed for HP-UX.
[SVN r39517]
2007-09-25 01:56:46 +00:00
Christopher Kohlhoff
0987067acc Add extra library 'ipv6' needed on HP-UX.
[SVN r39509]
2007-09-24 13:32:47 +00:00
Christopher Kohlhoff
9f53a075ff Define _WIN32_WINNT to suppress warnings. Add define necessary
for building with cygwin.


[SVN r39100]
2007-09-01 07:32:28 +00:00
Christopher Kohlhoff
ff67d39c15 Ignore errors from shutdown().
[SVN r39093]
2007-09-01 06:13:02 +00:00
Vladimir Prus
00be9349dc Revive V1 Jamfiles at Christopher's request
[SVN r38822]
2007-08-21 13:55:41 +00:00
Christopher Kohlhoff
0a83dd0dc5 Clean up gcc warnings.
[SVN r38790]
2007-08-20 14:21:47 +00:00
Christopher Kohlhoff
a1971d2123 Use shutdown() for portable graceful connection closure.
[SVN r38789]
2007-08-20 14:19:49 +00:00