From 771774b926c55a75ad31b258710568fd50b5b27c Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 26 Nov 2007 21:29:38 +0000 Subject: [PATCH 01/60] WinCE doesn't work with all multicast addresses, and even though it doesn't support the multicast::enable_loopback option you can still get the value. [SVN r41407] --- test/ip/multicast.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/test/ip/multicast.cpp b/test/ip/multicast.cpp index 45187d4b..22b8597e 100644 --- a/test/ip/multicast.cpp +++ b/test/ip/multicast.cpp @@ -106,7 +106,7 @@ namespace ip_multicast_runtime { #if defined(__hpux) // HP-UX doesn't declare this function extern "C", so it is declared again here -// to avoid a linker errors about an undefined symbol. +// to avoid a linker error about an undefined symbol. extern "C" unsigned int if_nametoindex(const char*); #endif // defined(__hpux) @@ -132,8 +132,16 @@ void test() BOOST_CHECK(have_v4 || have_v6); +#if defined(BOOST_WINDOWS) && defined(UNDER_CE) + // Windows CE seems to have problems with some multicast group addresses. + // The following address works on CE, but as it is not a private multicast + // address it will not be used on other platforms. + const ip::address multicast_address_v4 = + ip::address::from_string("239.0.0.4", ec); +#else // defined(BOOST_WINDOWS) && defined(UNDER_CE) const ip::address multicast_address_v4 = ip::address::from_string("239.255.0.1", ec); +#endif // defined(BOOST_WINDOWS) && defined(UNDER_CE) BOOST_CHECK(!have_v4 || !ec); const ip::address multicast_address_v6 = @@ -261,9 +269,8 @@ void test() ip::multicast::enable_loopback enable_loopback2; sock_v4.get_option(enable_loopback2, ec); #if defined(BOOST_WINDOWS) && defined(UNDER_CE) - // Option is not supported under Windows CE. - BOOST_CHECK_MESSAGE(ec == boost::asio::error::no_protocol_option, - ec.value() << ", " << ec.message()); + // Not supported under Windows CE but can get value. + BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); #else // defined(BOOST_WINDOWS) && defined(UNDER_CE) BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); BOOST_CHECK(enable_loopback2.value()); @@ -287,9 +294,8 @@ void test() ip::multicast::enable_loopback enable_loopback4; sock_v4.get_option(enable_loopback4, ec); #if defined(BOOST_WINDOWS) && defined(UNDER_CE) - // Option is not supported under Windows CE. - BOOST_CHECK_MESSAGE(ec == boost::asio::error::no_protocol_option, - ec.value() << ", " << ec.message()); + // Not supported under Windows CE but can get value. + BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); #else // defined(BOOST_WINDOWS) && defined(UNDER_CE) BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); BOOST_CHECK(!enable_loopback4.value()); From 1172215e3d7775d6da3804c129674a1f015c991e Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 28 Nov 2007 13:26:33 +0000 Subject: [PATCH 02/60] Make async operations fail with an error if the socket descriptor doesn't fit into the select call's fd_set. [SVN r41432] --- include/boost/asio/detail/posix_fd_set_adapter.hpp | 13 +++++++++---- include/boost/asio/detail/reactor_op_queue.hpp | 7 ++++++- include/boost/asio/detail/win_fd_set_adapter.hpp | 8 ++++++-- include/boost/asio/error.hpp | 7 ++++++- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/include/boost/asio/detail/posix_fd_set_adapter.hpp b/include/boost/asio/detail/posix_fd_set_adapter.hpp index b4a26091..adcf66d0 100644 --- a/include/boost/asio/detail/posix_fd_set_adapter.hpp +++ b/include/boost/asio/detail/posix_fd_set_adapter.hpp @@ -36,11 +36,16 @@ public: FD_ZERO(&fd_set_); } - void set(socket_type descriptor) + bool set(socket_type descriptor) { - if (max_descriptor_ == invalid_socket || descriptor > max_descriptor_) - max_descriptor_ = descriptor; - FD_SET(descriptor, &fd_set_); + if (descriptor < FD_SETSIZE) + { + if (max_descriptor_ == invalid_socket || descriptor > max_descriptor_) + max_descriptor_ = descriptor; + FD_SET(descriptor, &fd_set_); + return true; + } + return false; } bool is_set(socket_type descriptor) const diff --git a/include/boost/asio/detail/reactor_op_queue.hpp b/include/boost/asio/detail/reactor_op_queue.hpp index 78fb50ad..d455070a 100644 --- a/include/boost/asio/detail/reactor_op_queue.hpp +++ b/include/boost/asio/detail/reactor_op_queue.hpp @@ -174,8 +174,13 @@ public: typename operation_map::iterator i = operations_.begin(); while (i != operations_.end()) { - descriptors.set(i->first); + Descriptor descriptor = i->first; ++i; + if (!descriptors.set(descriptor)) + { + boost::system::error_code ec(error::fd_set_failure); + dispatch_all_operations(descriptor, ec); + } } } diff --git a/include/boost/asio/detail/win_fd_set_adapter.hpp b/include/boost/asio/detail/win_fd_set_adapter.hpp index 3a824e86..9a624b21 100644 --- a/include/boost/asio/detail/win_fd_set_adapter.hpp +++ b/include/boost/asio/detail/win_fd_set_adapter.hpp @@ -37,13 +37,17 @@ public: fd_set_.fd_count = 0; } - void set(socket_type descriptor) + bool set(socket_type descriptor) { for (u_int i = 0; i < fd_set_.fd_count; ++i) if (fd_set_.fd_array[i] == descriptor) - return; + return true; if (fd_set_.fd_count < win_fd_set_size) + { fd_set_.fd_array[fd_set_.fd_count++] = descriptor; + return true; + } + return false; } bool is_set(socket_type descriptor) const diff --git a/include/boost/asio/error.hpp b/include/boost/asio/error.hpp index 0061955b..814f33b6 100644 --- a/include/boost/asio/error.hpp +++ b/include/boost/asio/error.hpp @@ -195,7 +195,10 @@ enum misc_errors eof, /// Element not found. - not_found + not_found, + + /// The descriptor cannot fit into the select system call's fd_set. + fd_set_failure }; enum ssl_errors @@ -301,6 +304,8 @@ public: return "End of file"; if (value == error::not_found) return "Element not found"; + if (value == error::fd_set_failure) + return "The descriptor does not fit into the select call's fd_set"; return "asio.misc error"; } }; From 8b36f0a0fd36a97675a1ae193448dc4df71b0fd7 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Thu, 29 Nov 2007 22:26:02 +0000 Subject: [PATCH 03/60] Update implementation notes to match current Win32 implementation where timers no longer require a separate thread. [SVN r41477] --- doc/design/implementation.qbk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/design/implementation.qbk b/doc/design/implementation.qbk index 84f39e84..30dce75a 100644 --- a/doc/design/implementation.qbk +++ b/doc/design/implementation.qbk @@ -194,8 +194,7 @@ Demultiplexing mechanism: * Uses overlapped I/O and I/O completion ports for all asynchronous socket operations except for asynchronous connect. -* Uses `select` for `deadline_timer` operations and for emulating asynchronous -connect. +* Uses `select` for emulating asynchronous connect. Threads: @@ -204,8 +203,7 @@ Threads: `io_service::poll_one()`. * An additional thread per `io_service` is used for the `select` -demultiplexing. This thread is created whenever the first `deadline_timer` is -created, or on the first call to `async_connect()`. +demultiplexing. This thread is created on the first call to `async_connect()`. * An additional thread per `io_service` is used to emulate asynchronous host resolution. This thread is created on the first call to either From df404ca9589dcc7f09e7b998a4cc072e8b35fe3e Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Thu, 29 Nov 2007 22:26:44 +0000 Subject: [PATCH 04/60] Add macro documentation. [SVN r41478] --- doc/using.qbk | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/doc/using.qbk b/doc/using.qbk index bd9c2dcf..f58601b6 100644 --- a/doc/using.qbk +++ b/doc/using.qbk @@ -130,4 +130,100 @@ name of the `boost_system` library may vary depending on the compiler version): ] +[heading Macros] + +The macros listed in the table below may be used to control the behaviour of +Boost.Asio. + +[table + [[Macro][Description]] + [ + [`BOOST_ASIO_ENABLE_BUFFER_DEBUGGING`] + [ + Enables Boost.Asio's buffer debugging support, which can help identify when + invalid buffers are used in read or write operations (e.g. if a + std::string object being written is destroyed before the write operation + completes). + + When using Microsoft Visual C++, this macro is defined automatically if + the compiler's iterator debugging support is enabled, unless + `BOOST_ASIO_DISABLE_BUFFER_DEBUGGING` has been defined. + + When using g++, this macro is defined automatically if standard library + debugging is enabled (`_GLIBCXX_DEBUG` is defined), unless + `BOOST_ASIO_DISABLE_BUFFER_DEBUGGING` has been defined. + ] + ] + [ + [`BOOST_ASIO_DISABLE_BUFFER_DEBUGGING`] + [ + Explictly disables Boost.Asio's buffer debugging support. + ] + ] + [ + [`BOOST_ASIO_DISABLE_DEV_POLL`] + [ + Explicitly disables [^/dev/poll] support on Solaris, forcing the use of + a `select`-based implementation. + ] + ] + [ + [`BOOST_ASIO_DISABLE_EPOLL`] + [ + Explicitly disables `epoll` support on Linux, forcing the use of a + `select`-based implementation. + ] + ] + [ + [`BOOST_ASIO_DISABLE_KQUEUE`] + [ + Explicitly disables `kqueue` support on Mac OS X and BSD variants, + forcing the use of a `select`-based implementation. + ] + ] + [ + [`BOOST_ASIO_DISABLE_IOCP`] + [ + Explicitly disables I/O completion ports support on Windows, forcing the + use of a `select`-based implementation. + ] + ] + [ + [`BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN`] + [ + By default, Boost.Asio will automatically define `WIN32_LEAN_AND_MEAN` when + compiling for Windows, to minimise the number of Windows SDK header files + and features that are included. The presence of + `BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN` prevents `WIN32_LEAN_AND_MEAN` from + being defined. + ] + ] + [ + [`BOOST_ASIO_NO_DEFAULT_LINKED_LIBS`] + [ + When compiling for Windows using Microsoft Visual C++ or Borland C++, Boost.Asio + will automatically link in the necessary Windows SDK libraries for sockets + support (i.e. [^ws2_32.lib] and [^mswsock.lib], or [^ws2.lib] when + building for Windows CE). The `BOOST_ASIO_NO_DEFAULT_LINKED_LIBS` macro + prevents these libraries from being linked. + ] + ] + [ + [`BOOST_ASIO_SOCKET_STREAMBUF_MAX_ARITY`] + [ + Determines the maximum number of arguments that may be passed to the + `basic_socket_streambuf` class template's `connect` member function. + Defaults to 5. + ] + ] + [ + [`BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY`] + [ + Determines the maximum number of arguments that may be passed to the + `basic_socket_iostream` class template's constructor and `connect` member + function. Defaults to 5. + ] + ] +] + [endsect] From 312551ab47b0cbbdc360f3c9748550b80dea232d Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Tue, 4 Dec 2007 21:28:42 +0000 Subject: [PATCH 05/60] Prevent deprecated function warnings for MSVC >= 8. [SVN r41701] --- include/boost/asio/detail/socket_ops.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/boost/asio/detail/socket_ops.hpp b/include/boost/asio/detail/socket_ops.hpp index cbbf725b..7b5e2370 100644 --- a/include/boost/asio/detail/socket_ops.hpp +++ b/include/boost/asio/detail/socket_ops.hpp @@ -1125,8 +1125,12 @@ inline void gai_free(void* p) inline void gai_strcpy(char* target, const char* source, std::size_t max_size) { using namespace std; +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) + strcpy_s(target, max_size, source); +#else *target = 0; strncat(target, source, max_size); +#endif } enum { gai_clone_flag = 1 << 30 }; @@ -1659,7 +1663,11 @@ inline boost::system::error_code getnameinfo_emulation( { return ec = boost::asio::error::no_buffer_space; } +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) + sprintf_s(serv, servlen, "%u", ntohs(port)); +#else sprintf(serv, "%u", ntohs(port)); +#endif } else { @@ -1678,7 +1686,11 @@ inline boost::system::error_code getnameinfo_emulation( { return ec = boost::asio::error::no_buffer_space; } +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) + sprintf_s(serv, servlen, "%u", ntohs(port)); +#else sprintf(serv, "%u", ntohs(port)); +#endif } #if defined(BOOST_HAS_THREADS) && defined(BOOST_HAS_PTHREADS) ::pthread_mutex_unlock(&mutex); From 1c123accd8cf931df2f4117b2f64e492d6daa1a4 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 5 Dec 2007 21:46:19 +0000 Subject: [PATCH 06/60] Don't use deprecated function workaround when compiling for Windows CE. [SVN r41762] --- include/boost/asio/detail/socket_ops.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/asio/detail/socket_ops.hpp b/include/boost/asio/detail/socket_ops.hpp index 7b5e2370..7464f19f 100644 --- a/include/boost/asio/detail/socket_ops.hpp +++ b/include/boost/asio/detail/socket_ops.hpp @@ -1125,7 +1125,7 @@ inline void gai_free(void* p) inline void gai_strcpy(char* target, const char* source, std::size_t max_size) { using namespace std; -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) strcpy_s(target, max_size, source); #else *target = 0; @@ -1663,7 +1663,7 @@ inline boost::system::error_code getnameinfo_emulation( { return ec = boost::asio::error::no_buffer_space; } -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) sprintf_s(serv, servlen, "%u", ntohs(port)); #else sprintf(serv, "%u", ntohs(port)); @@ -1686,7 +1686,7 @@ inline boost::system::error_code getnameinfo_emulation( { return ec = boost::asio::error::no_buffer_space; } -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) sprintf_s(serv, servlen, "%u", ntohs(port)); #else sprintf(serv, "%u", ntohs(port)); From 8d4d725277d52d31b836ecc6f66e5541e5d7ca41 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Fri, 7 Dec 2007 12:53:39 +0000 Subject: [PATCH 07/60] Try to fix stall when sending large amounts of data over SSL. [SVN r41823] --- .../asio/ssl/detail/openssl_operation.hpp | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/include/boost/asio/ssl/detail/openssl_operation.hpp b/include/boost/asio/ssl/detail/openssl_operation.hpp index 7501ba42..690d1fbd 100644 --- a/include/boost/asio/ssl/detail/openssl_operation.hpp +++ b/include/boost/asio/ssl/detail/openssl_operation.hpp @@ -101,6 +101,10 @@ public: &openssl_operation::do_async_write, this, boost::arg<1>(), boost::arg<2>() ); + read_ = boost::bind( + &openssl_operation::do_async_read, + this + ); handler_= boost::bind( &openssl_operation::async_user_handler, this, boost::arg<1>(), boost::arg<2>() @@ -123,6 +127,10 @@ public: &openssl_operation::do_sync_write, this, boost::arg<1>(), boost::arg<2>() ); + read_ = boost::bind( + &openssl_operation::do_sync_read, + this + ); handler_ = boost::bind( &openssl_operation::sync_user_handler, this, boost::arg<1>(), boost::arg<2>() @@ -135,7 +143,7 @@ public: int start() { int rc = primitive_( session_ ); - int sys_error_code = ERR_get_error(); + bool is_operation_done = (rc > 0); // For connect/accept/shutdown, the operation // is done, when return code is 1 @@ -145,6 +153,8 @@ public: int error_code = !is_operation_done ? ::SSL_get_error( session_, rc ) : 0; + int sys_error_code = ERR_get_error(); + bool is_read_needed = (error_code == SSL_ERROR_WANT_READ); bool is_write_needed = (error_code == SSL_ERROR_WANT_WRITE || ::BIO_ctrl_pending( ssl_bio_ )); @@ -212,6 +222,10 @@ public: return start(); } + else if (is_read_needed) + { + return read_(); + } } // Continue with operation, flush any SSL data out to network... @@ -223,10 +237,12 @@ private: typedef boost::function int_handler_func; typedef boost::function write_func; + typedef boost::function read_func; ssl_primitive_func primitive_; user_handler_func user_handler_; write_func write_; + read_func read_; int_handler_func handler_; net_buffer send_buf_; // buffers for network IO @@ -250,8 +266,15 @@ private: throw boost::system::system_error(error); } - int async_user_handler(const boost::system::error_code& error, int rc) + int async_user_handler(boost::system::error_code error, int rc) { + if (rc < 0) + { + if (!error) + error = boost::asio::error::no_recovery; + rc = 0; + } + user_handler_(error, rc); return 0; } @@ -316,8 +339,8 @@ private: } // OPeration is not done and writing to net has been made... - // start reading... - do_async_read(); + // start operation again + start(); return 0; } @@ -340,7 +363,7 @@ private: handler_(error, rc); } - void do_async_read() + int do_async_read() { // Wait for new data socket_.async_read_some @@ -355,6 +378,7 @@ private: boost::asio::placeholders::bytes_transferred ) ); + return 0; } void async_read_handler(const boost::system::error_code& error, @@ -433,8 +457,8 @@ private: // Finish the operation, with success return rc; - // Operation is not finished, read data from net... - return do_sync_read(); + // Operation is not finished, start again. + return start(); } int do_sync_read() From c049e9cb53afc815128840f2616f55d75998d23c Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Sat, 8 Dec 2007 00:18:59 +0000 Subject: [PATCH 08/60] Documentation fixes. [SVN r41845] --- doc/reference.qbk | 241 +++++++++++++++++++++++++++++----------------- doc/reference.xsl | 22 ++++- 2 files changed, 174 insertions(+), 89 deletions(-) diff --git a/doc/reference.qbk b/doc/reference.qbk index 45fe298b..f15dd83d 100644 --- a/doc/reference.qbk +++ b/doc/reference.qbk @@ -3879,7 +3879,7 @@ The basic_socket class template provides functionality that is common to both st The maximum length of the queue of pending incoming connections. - static const int max_connections; + static const int max_connections = implementation_defined; @@ -3894,7 +3894,7 @@ The maximum length of the queue of pending incoming connections. Specify that the data should not be subject to routing. - static const int message_do_not_route; + static const int message_do_not_route = implementation_defined; @@ -3925,7 +3925,7 @@ Bitmask type for flags that can be passed to send and receive operations. Process out-of-band data. - static const int message_out_of_band; + static const int message_out_of_band = implementation_defined; @@ -3940,7 +3940,7 @@ Process out-of-band data. Peek at incoming data without removing it from the input queue. - static const int message_peek; + static const int message_peek = implementation_defined; @@ -8445,7 +8445,7 @@ The basic_socket class template provides functionality that is common to both st The maximum length of the queue of pending incoming connections. - static const int max_connections; + static const int max_connections = implementation_defined; @@ -8460,7 +8460,7 @@ The maximum length of the queue of pending incoming connections. Specify that the data should not be subject to routing. - static const int message_do_not_route; + static const int message_do_not_route = implementation_defined; @@ -8491,7 +8491,7 @@ Bitmask type for flags that can be passed to send and receive operations. Process out-of-band data. - static const int message_out_of_band; + static const int message_out_of_band = implementation_defined; @@ -8506,7 +8506,7 @@ Process out-of-band data. Peek at incoming data without removing it from the input queue. - static const int message_peek; + static const int message_peek = implementation_defined; @@ -11089,7 +11089,7 @@ An object that represents the local endpoint of the acceptor. Returns a default- The maximum length of the queue of pending incoming connections. - static const int max_connections; + static const int max_connections = implementation_defined; @@ -11104,7 +11104,7 @@ The maximum length of the queue of pending incoming connections. Specify that the data should not be subject to routing. - static const int message_do_not_route; + static const int message_do_not_route = implementation_defined; @@ -11135,7 +11135,7 @@ Bitmask type for flags that can be passed to send and receive operations. Process out-of-band data. - static const int message_out_of_band; + static const int message_out_of_band = implementation_defined; @@ -11150,7 +11150,7 @@ Process out-of-band data. Peek at incoming data without removing it from the input queue. - static const int message_peek; + static const int message_peek = implementation_defined; @@ -13870,7 +13870,7 @@ The basic_socket class template provides functionality that is common to both st The maximum length of the queue of pending incoming connections. - static const int max_connections; + static const int max_connections = implementation_defined; @@ -13885,7 +13885,7 @@ The maximum length of the queue of pending incoming connections. Specify that the data should not be subject to routing. - static const int message_do_not_route; + static const int message_do_not_route = implementation_defined; @@ -13916,7 +13916,7 @@ Bitmask type for flags that can be passed to send and receive operations. Process out-of-band data. - static const int message_out_of_band; + static const int message_out_of_band = implementation_defined; @@ -13931,7 +13931,7 @@ Process out-of-band data. Peek at incoming data without removing it from the input queue. - static const int message_peek; + static const int message_peek = implementation_defined; @@ -17346,7 +17346,7 @@ The basic_socket class template provides functionality that is common to both st The maximum length of the queue of pending incoming connections. - static const int max_connections; + static const int max_connections = implementation_defined; @@ -17361,7 +17361,7 @@ The maximum length of the queue of pending incoming connections. Specify that the data should not be subject to routing. - static const int message_do_not_route; + static const int message_do_not_route = implementation_defined; @@ -17392,7 +17392,7 @@ Bitmask type for flags that can be passed to send and receive operations. Process out-of-band data. - static const int message_out_of_band; + static const int message_out_of_band = implementation_defined; @@ -17407,7 +17407,7 @@ Process out-of-band data. Peek at incoming data without removing it from the input queue. - static const int message_peek; + static const int message_peek = implementation_defined; @@ -19793,7 +19793,7 @@ Close the stream. The default buffer size. - static const std::size_t default_buffer_size; + static const std::size_t default_buffer_size = implementation_defined; @@ -20963,7 +20963,7 @@ Close the stream. The default buffer size. - static const std::size_t default_buffer_size; + static const std::size_t default_buffer_size = implementation_defined; @@ -22881,7 +22881,7 @@ The time traits type. - static const boost::system::error_category & addrinfo_category; + static const boost::system::error_category & addrinfo_category = boost::asio::error::get_addrinfo_category(); @@ -23084,6 +23084,66 @@ The time traits type. +[endsect] + + + +[section:error__get_addrinfo_category error::get_addrinfo_category] + + + + const boost::system::error_category & get_addrinfo_category(); + + + +[endsect] + + + +[section:error__get_misc_category error::get_misc_category] + + + + const boost::system::error_category & get_misc_category(); + + + +[endsect] + + + +[section:error__get_netdb_category error::get_netdb_category] + + + + const boost::system::error_category & get_netdb_category(); + + + +[endsect] + + + +[section:error__get_ssl_category error::get_ssl_category] + + + + const boost::system::error_category & get_ssl_category(); + + + +[endsect] + + + +[section:error__get_system_category error::get_system_category] + + + + const boost::system::error_category & get_system_category(); + + + [endsect] @@ -23178,7 +23238,7 @@ The time traits type. - static const boost::system::error_category & misc_category; + static const boost::system::error_category & misc_category = boost::asio::error::get_misc_category(); @@ -23210,6 +23270,11 @@ The time traits type. [Element not found. ] ] + [ + [fd_set_failure] + [The descriptor cannot fit into the select system call's fd_set. ] + ] + ] @@ -23222,7 +23287,7 @@ The time traits type. - static const boost::system::error_category & netdb_category; + static const boost::system::error_category & netdb_category = boost::asio::error::get_netdb_category(); @@ -23271,7 +23336,7 @@ The time traits type. - static const boost::system::error_category & ssl_category; + static const boost::system::error_category & ssl_category = boost::asio::error::get_ssl_category(); @@ -23300,7 +23365,7 @@ The time traits type. - static const boost::system::error_category & system_category; + static const boost::system::error_category & system_category = boost::asio::error::get_system_category(); @@ -27770,7 +27835,7 @@ The Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. - static const int address_configured; + static const int address_configured = implementation_defined; @@ -27785,7 +27850,7 @@ Only return IPv4 addresses if a non-loopback IPv4 address is configured for the If used with v4_mapped, return all matching IPv6 and IPv4 addresses. - static const int all_matching; + static const int all_matching = implementation_defined; @@ -27886,7 +27951,7 @@ Construct with specified host name and service name for a given protocol. Determine the canonical name of the host specified in the query. - static const int canonical_name; + static const int canonical_name = implementation_defined; @@ -27925,7 +27990,7 @@ Get the host name associated with the query. Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. - static const int numeric_host; + static const int numeric_host = implementation_defined; @@ -27940,7 +28005,7 @@ Host name should be treated as a numeric string defining an IPv4 or IPv6 address Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. - static const int numeric_service; + static const int numeric_service = implementation_defined; @@ -27955,7 +28020,7 @@ Service name should be treated as a numeric string defining a port number and no Indicate that returned endpoint is intended for use as a locally bound socket endpoint. - static const int passive; + static const int passive = implementation_defined; @@ -27995,7 +28060,7 @@ Get the service name associated with the query. If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. - static const int v4_mapped; + static const int v4_mapped = implementation_defined; @@ -28267,7 +28332,7 @@ The resolver_query_base class is used as a base for the basic_resolver_query cla Only return IPv4 addresses if a non-loopback IPv4 address is configured for the system. Only return IPv6 addresses if a non-loopback IPv6 address is configured for the system. - static const int address_configured; + static const int address_configured = implementation_defined; @@ -28279,7 +28344,7 @@ Only return IPv4 addresses if a non-loopback IPv4 address is configured for the If used with v4_mapped, return all matching IPv6 and IPv4 addresses. - static const int all_matching; + static const int all_matching = implementation_defined; @@ -28291,7 +28356,7 @@ If used with v4_mapped, return all matching IPv6 and IPv4 addresses. Determine the canonical name of the host specified in the query. - static const int canonical_name; + static const int canonical_name = implementation_defined; @@ -28303,7 +28368,7 @@ Determine the canonical name of the host specified in the query. Host name should be treated as a numeric string defining an IPv4 or IPv6 address and no name resolution should be attempted. - static const int numeric_host; + static const int numeric_host = implementation_defined; @@ -28315,7 +28380,7 @@ Host name should be treated as a numeric string defining an IPv4 or IPv6 address Service name should be treated as a numeric string defining a port number and no name resolution should be attempted. - static const int numeric_service; + static const int numeric_service = implementation_defined; @@ -28327,7 +28392,7 @@ Service name should be treated as a numeric string defining a port number and no Indicate that returned endpoint is intended for use as a locally bound socket endpoint. - static const int passive; + static const int passive = implementation_defined; @@ -28339,7 +28404,7 @@ Indicate that returned endpoint is intended for use as a locally bound socket en If the query protocol family is specified as IPv6, return IPv4-mapped IPv6 addresses on finding no IPv6 addresses. - static const int v4_mapped; + static const int v4_mapped = implementation_defined; @@ -33256,7 +33321,7 @@ Getting the current option value: The maximum length of the queue of pending incoming connections. - static const int max_connections; + static const int max_connections = implementation_defined; @@ -33268,7 +33333,7 @@ The maximum length of the queue of pending incoming connections. Specify that the data should not be subject to routing. - static const int message_do_not_route; + static const int message_do_not_route = implementation_defined; @@ -33293,7 +33358,7 @@ Bitmask type for flags that can be passed to send and receive operations. Process out-of-band data. - static const int message_out_of_band; + static const int message_out_of_band = implementation_defined; @@ -33305,7 +33370,7 @@ Process out-of-band data. Peek at incoming data without removing it from the input queue. - static const int message_peek; + static const int message_peek = implementation_defined; @@ -33862,7 +33927,7 @@ Constructor. Implement various bug workarounds. - static const int default_workarounds; + static const int default_workarounds = implementation_defined; @@ -34091,7 +34156,7 @@ Different methods supported by a context. Disable SSL v2. - static const int no_sslv2; + static const int no_sslv2 = implementation_defined; @@ -34106,7 +34171,7 @@ Disable SSL v2. Disable SSL v3. - static const int no_sslv3; + static const int no_sslv3 = implementation_defined; @@ -34121,7 +34186,7 @@ Disable SSL v3. Disable TLS v1. - static const int no_tlsv1; + static const int no_tlsv1 = implementation_defined; @@ -34450,7 +34515,7 @@ This function may be used to configure the peer verification mode used by the co Always create a new key when using tmp_dh parameters. - static const int single_dh_use; + static const int single_dh_use = implementation_defined; @@ -34874,7 +34939,7 @@ This function is used to load Diffie-Hellman parameters into the context from a Do not request client certificate on renegotiation. Ignored unless verify_peer is set. - static const int verify_client_once; + static const int verify_client_once = implementation_defined; @@ -34889,7 +34954,7 @@ Do not request client certificate on renegotiation. Ignored unless verify_peer i Fail verification if the peer has no certificate. Ignored unless verify_peer is set. - static const int verify_fail_if_no_peer_cert; + static const int verify_fail_if_no_peer_cert = implementation_defined; @@ -34920,7 +34985,7 @@ Bitmask type for peer verification. No verification. - static const int verify_none; + static const int verify_none = implementation_defined; @@ -34935,7 +35000,7 @@ No verification. Verify the peer. - static const int verify_peer; + static const int verify_peer = implementation_defined; @@ -35251,7 +35316,7 @@ The context_base class is used as a base for the basic_context class template so Implement various bug workarounds. - static const int default_workarounds; + static const int default_workarounds = implementation_defined; @@ -35367,7 +35432,7 @@ Different methods supported by a context. Disable SSL v2. - static const int no_sslv2; + static const int no_sslv2 = implementation_defined; @@ -35379,7 +35444,7 @@ Disable SSL v2. Disable SSL v3. - static const int no_sslv3; + static const int no_sslv3 = implementation_defined; @@ -35391,7 +35456,7 @@ Disable SSL v3. Disable TLS v1. - static const int no_tlsv1; + static const int no_tlsv1 = implementation_defined; @@ -35443,7 +35508,7 @@ Purpose of PEM password. Always create a new key when using tmp_dh parameters. - static const int single_dh_use; + static const int single_dh_use = implementation_defined; @@ -35455,7 +35520,7 @@ Always create a new key when using tmp_dh parameters. Do not request client certificate on renegotiation. Ignored unless verify_peer is set. - static const int verify_client_once; + static const int verify_client_once = implementation_defined; @@ -35467,7 +35532,7 @@ Do not request client certificate on renegotiation. Ignored unless verify_peer i Fail verification if the peer has no certificate. Ignored unless verify_peer is set. - static const int verify_fail_if_no_peer_cert; + static const int verify_fail_if_no_peer_cert = implementation_defined; @@ -35492,7 +35557,7 @@ Bitmask type for peer verification. No verification. - static const int verify_none; + static const int verify_none = implementation_defined; @@ -35504,7 +35569,7 @@ No verification. Verify the peer. - static const int verify_peer; + static const int verify_peer = implementation_defined; @@ -38992,12 +39057,12 @@ The number of bytes written. If an error occurs, returns the total number of byt [endsect] -[section:error__addrinfo_errors__gt_ error::addrinfo_errors >] +[section:is_error_code_enum_lt__addrinfo_errors__gt_ boost::system::is_error_code_enum< boost::asio::error::addrinfo_errors >] template<> - struct is_error_code_enum< boost::asio::error::addrinfo_errors > + struct boost::system::is_error_code_enum< boost::asio::error::addrinfo_errors > [heading Data Members] @@ -39005,18 +39070,18 @@ The number of bytes written. If an error occurs, returns the total number of byt [[Name][Description]] [ - [[link boost_asio.reference.error__addrinfo_errors__gt_.value [*value]]] + [[link boost_asio.reference.is_error_code_enum_lt__addrinfo_errors__gt_.value [*value]]] [] ] ] -[section:value error::addrinfo_errors >::value] +[section:value boost::system::is_error_code_enum< boost::asio::error::addrinfo_errors >::value] - static const bool value; + static const bool value = true; @@ -39026,12 +39091,12 @@ The number of bytes written. If an error occurs, returns the total number of byt [endsect] -[section:error__basic_errors__gt_ error::basic_errors >] +[section:is_error_code_enum_lt__basic_errors__gt_ boost::system::is_error_code_enum< boost::asio::error::basic_errors >] template<> - struct is_error_code_enum< boost::asio::error::basic_errors > + struct boost::system::is_error_code_enum< boost::asio::error::basic_errors > [heading Data Members] @@ -39039,18 +39104,18 @@ The number of bytes written. If an error occurs, returns the total number of byt [[Name][Description]] [ - [[link boost_asio.reference.error__basic_errors__gt_.value [*value]]] + [[link boost_asio.reference.is_error_code_enum_lt__basic_errors__gt_.value [*value]]] [] ] ] -[section:value error::basic_errors >::value] +[section:value boost::system::is_error_code_enum< boost::asio::error::basic_errors >::value] - static const bool value; + static const bool value = true; @@ -39060,12 +39125,12 @@ The number of bytes written. If an error occurs, returns the total number of byt [endsect] -[section:error__misc_errors__gt_ error::misc_errors >] +[section:is_error_code_enum_lt__misc_errors__gt_ boost::system::is_error_code_enum< boost::asio::error::misc_errors >] template<> - struct is_error_code_enum< boost::asio::error::misc_errors > + struct boost::system::is_error_code_enum< boost::asio::error::misc_errors > [heading Data Members] @@ -39073,18 +39138,18 @@ The number of bytes written. If an error occurs, returns the total number of byt [[Name][Description]] [ - [[link boost_asio.reference.error__misc_errors__gt_.value [*value]]] + [[link boost_asio.reference.is_error_code_enum_lt__misc_errors__gt_.value [*value]]] [] ] ] -[section:value error::misc_errors >::value] +[section:value boost::system::is_error_code_enum< boost::asio::error::misc_errors >::value] - static const bool value; + static const bool value = true; @@ -39094,12 +39159,12 @@ The number of bytes written. If an error occurs, returns the total number of byt [endsect] -[section:error__netdb_errors__gt_ error::netdb_errors >] +[section:is_error_code_enum_lt__netdb_errors__gt_ boost::system::is_error_code_enum< boost::asio::error::netdb_errors >] template<> - struct is_error_code_enum< boost::asio::error::netdb_errors > + struct boost::system::is_error_code_enum< boost::asio::error::netdb_errors > [heading Data Members] @@ -39107,18 +39172,18 @@ The number of bytes written. If an error occurs, returns the total number of byt [[Name][Description]] [ - [[link boost_asio.reference.error__netdb_errors__gt_.value [*value]]] + [[link boost_asio.reference.is_error_code_enum_lt__netdb_errors__gt_.value [*value]]] [] ] ] -[section:value error::netdb_errors >::value] +[section:value boost::system::is_error_code_enum< boost::asio::error::netdb_errors >::value] - static const bool value; + static const bool value = true; @@ -39128,12 +39193,12 @@ The number of bytes written. If an error occurs, returns the total number of byt [endsect] -[section:error__ssl_errors__gt_ error::ssl_errors >] +[section:is_error_code_enum_lt__ssl_errors__gt_ boost::system::is_error_code_enum< boost::asio::error::ssl_errors >] template<> - struct is_error_code_enum< boost::asio::error::ssl_errors > + struct boost::system::is_error_code_enum< boost::asio::error::ssl_errors > [heading Data Members] @@ -39141,18 +39206,18 @@ The number of bytes written. If an error occurs, returns the total number of byt [[Name][Description]] [ - [[link boost_asio.reference.error__ssl_errors__gt_.value [*value]]] + [[link boost_asio.reference.is_error_code_enum_lt__ssl_errors__gt_.value [*value]]] [] ] ] -[section:value error::ssl_errors >::value] +[section:value boost::system::is_error_code_enum< boost::asio::error::ssl_errors >::value] - static const bool value; + static const bool value = true; diff --git a/doc/reference.xsl b/doc/reference.xsl index c4476ddf..2a650d13 100644 --- a/doc/reference.xsl +++ b/doc/reference.xsl @@ -103,6 +103,9 @@ + + + @@ -116,6 +119,9 @@ + + + @@ -143,6 +149,18 @@ + + + + + + + + + + static ; + select="type"/> + = + ; From cc9a0bb517576b7037943689fabf7b94a38bfcab Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Sat, 8 Dec 2007 13:00:45 +0000 Subject: [PATCH 09/60] Documentation fixes. [SVN r41867] --- doc/asio.qbk | 1 - doc/examples.qbk | 12 +++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/asio.qbk b/doc/asio.qbk index a9605af8..57c65941 100644 --- a/doc/asio.qbk +++ b/doc/asio.qbk @@ -17,7 +17,6 @@ [authors [Kohlhoff, Christopher]] [category template] [category generic] - [last-revision $Date$] ] [template mdash[] '''— '''] diff --git a/doc/examples.qbk b/doc/examples.qbk index 991667e8..a5df0e46 100644 --- a/doc/examples.qbk +++ b/doc/examples.qbk @@ -50,8 +50,8 @@ and asynchronous operations. [heading HTTP Client] Example programs implementing simple HTTP 1.0 clients. These examples show how -to use the [link boost_asio.reference.read_until] and [link -boost_asio.reference.async_read_until] functions. +to use the [link boost_asio.reference.read_until read_until] and [link +boost_asio.reference.async_read_until async_read_until] functions. * [@../../example/http/client/sync_client.cpp] * [@../../example/http/client/async_client.cpp] @@ -139,7 +139,8 @@ added to a priority queue rather than executed immediately. [heading Iostreams] -Two examples showing how to use [link boost_asio.reference.ip__tcp.iostream]. +Two examples showing how to use [link boost_asio.reference.ip__tcp.iostream +ip::tcp::iostream]. * [@../../example/iostreams/daytime_client.cpp] * [@../../example/iostreams/daytime_server.cpp] @@ -170,7 +171,7 @@ decode structures for transmission over a socket. This example demonstrates how to integrate custom functionality (in this case, for logging) into asio's [link boost_asio.reference.io_service io_service], and how to use a custom service with [link -boost_asio.reference.basic_stream_socket]. +boost_asio.reference.basic_stream_socket basic_stream_socket<>]. * [@../../example/services/basic_logger.hpp] * [@../../example/services/daytime_client.cpp] @@ -192,7 +193,8 @@ a proxy. [heading SSL] Example client and server programs showing the use of the [link -boost_asio.reference.ssl__stream] template with asynchronous operations. +boost_asio.reference.ssl__stream ssl::stream<>] template with asynchronous +operations. * [@../../example/ssl/client.cpp] * [@../../example/ssl/server.cpp] From 931e25063dee3b2c448a99cf758f1fc8f595c7d5 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Sat, 8 Dec 2007 13:48:52 +0000 Subject: [PATCH 10/60] Suppress signed/unsigned warning. [SVN r41868] --- include/boost/asio/detail/posix_fd_set_adapter.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/asio/detail/posix_fd_set_adapter.hpp b/include/boost/asio/detail/posix_fd_set_adapter.hpp index adcf66d0..1e629786 100644 --- a/include/boost/asio/detail/posix_fd_set_adapter.hpp +++ b/include/boost/asio/detail/posix_fd_set_adapter.hpp @@ -38,7 +38,7 @@ public: bool set(socket_type descriptor) { - if (descriptor < FD_SETSIZE) + if (descriptor < (socket_type)FD_SETSIZE) { if (max_descriptor_ == invalid_socket || descriptor > max_descriptor_) max_descriptor_ = descriptor; From 09665bffa43dc4b36e0ab752571ce7d29674b68a Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Sat, 8 Dec 2007 14:03:40 +0000 Subject: [PATCH 11/60] Ensure asio header comes before boost.thread header. [SVN r41870] --- example/chat/chat_client.cpp | 2 +- example/echo/blocking_tcp_echo_server.cpp | 2 +- test/io_service.cpp | 2 +- test/strand.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/chat/chat_client.cpp b/example/chat/chat_client.cpp index 1142b5e6..8cb64ff6 100644 --- a/example/chat/chat_client.cpp +++ b/example/chat/chat_client.cpp @@ -11,9 +11,9 @@ #include #include #include -#include #include #include +#include #include "chat_message.hpp" using boost::asio::ip::tcp; diff --git a/example/echo/blocking_tcp_echo_server.cpp b/example/echo/blocking_tcp_echo_server.cpp index 9cb68858..23e08ac5 100644 --- a/example/echo/blocking_tcp_echo_server.cpp +++ b/example/echo/blocking_tcp_echo_server.cpp @@ -10,10 +10,10 @@ #include #include -#include #include #include #include +#include using boost::asio::ip::tcp; diff --git a/test/io_service.cpp b/test/io_service.cpp index c1ad6d1b..58f4e6a0 100644 --- a/test/io_service.cpp +++ b/test/io_service.cpp @@ -17,9 +17,9 @@ #include #include -#include #include #include +#include #include "unit_test.hpp" using namespace boost::asio; diff --git a/test/strand.cpp b/test/strand.cpp index ba651160..6cb1a18b 100644 --- a/test/strand.cpp +++ b/test/strand.cpp @@ -17,9 +17,9 @@ #include #include -#include #include #include +#include #include "unit_test.hpp" using namespace boost::asio; From 808e0862ba5b196f0989f43f474cec3cd356c860 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 17 Dec 2007 13:04:30 +0000 Subject: [PATCH 12/60] Fixes for older HP-UX. [SVN r42119] --- include/boost/asio/detail/socket_types.hpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/boost/asio/detail/socket_types.hpp b/include/boost/asio/detail/socket_types.hpp index 26535b86..adcc5a6e 100644 --- a/include/boost/asio/detail/socket_types.hpp +++ b/include/boost/asio/detail/socket_types.hpp @@ -92,7 +92,11 @@ # include # include # include -# include +# if defined(__hpux) +# include +# else +# include +# endif # include # include # include @@ -157,7 +161,16 @@ const int max_addr_v4_str_len = INET_ADDRSTRLEN; const int max_addr_v6_str_len = INET6_ADDRSTRLEN + 1 + IF_NAMESIZE; typedef sockaddr socket_addr_type; typedef in_addr in4_addr_type; +# if defined(__hpux) +// HP-UX doesn't provide ip_mreq when _XOPEN_SOURCE_EXTENDED is defined. +struct in4_mreq_type +{ + struct in_addr imr_multiaddr; + struct in_addr imr_interface; +}; +# else typedef ip_mreq in4_mreq_type; +# endif typedef sockaddr_in sockaddr_in4_type; typedef in6_addr in6_addr_type; typedef ipv6_mreq in6_mreq_type; From 197952d66b1e59391392ca406866ad675bd580cf Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 17 Dec 2007 13:08:10 +0000 Subject: [PATCH 13/60] Bump version number. [SVN r42120] --- include/boost/asio/version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/asio/version.hpp b/include/boost/asio/version.hpp index 84fae8a3..302ec8ba 100644 --- a/include/boost/asio/version.hpp +++ b/include/boost/asio/version.hpp @@ -18,6 +18,6 @@ // BOOST_ASIO_VERSION % 100 is the sub-minor version // BOOST_ASIO_VERSION / 100 % 1000 is the minor version // BOOST_ASIO_VERSION / 100000 is the major version -#define BOOST_ASIO_VERSION 308 // 0.3.8 +#define BOOST_ASIO_VERSION 309 // 0.3.9 #endif // BOOST_ASIO_VERSION_HPP From 30db47b9f814b1c4f6e3dc9f397f6baf1e25e7af Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 17 Dec 2007 13:17:46 +0000 Subject: [PATCH 14/60] Documentation fixes. [SVN r42121] --- doc/reference.qbk | 4 ++-- include/boost/asio/ssl/stream.hpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/reference.qbk b/doc/reference.qbk index f15dd83d..ed5a0542 100644 --- a/doc/reference.qbk +++ b/doc/reference.qbk @@ -36133,11 +36133,11 @@ The stream class template provides asynchronous and blocking stream-oriented fun [heading Example] -To use the SSL stream template with a stream\_socket, you would write: +To use the SSL stream template with an ip::tcp::socket, you would write: boost::asio::io_service io_service; boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23); - boost::asio::ssl::stream sock(io_service, context); + boost::asio::ssl::stream sock(io_service, context); diff --git a/include/boost/asio/ssl/stream.hpp b/include/boost/asio/ssl/stream.hpp index 00d7529a..4d971533 100644 --- a/include/boost/asio/ssl/stream.hpp +++ b/include/boost/asio/ssl/stream.hpp @@ -45,16 +45,15 @@ namespace ssl { * @e Shared @e objects: Unsafe. * * @par Example - * To use the SSL stream template with a stream_socket, you would write: + * To use the SSL stream template with an ip::tcp::socket, you would write: * @code * boost::asio::io_service io_service; * boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23); - * boost::asio::ssl::stream sock(io_service, context); + * boost::asio::ssl::stream sock(io_service, context); * @endcode * * @par Concepts: - * Async_Object, Async_Read_Stream, Async_Write_Stream, Error_Source, Stream, - * Sync_Read_Stream, Sync_Write_Stream. + * AsyncReadStream, AsyncWriteStream, Stream, SyncRead_Stream, SyncWriteStream. */ template class stream From 2e343266ab16079fb04bab1713c5086da87045b9 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:13:35 +0000 Subject: [PATCH 15/60] Fix concept name in comment. [SVN r42750] --- example/buffers/reference_counted.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/buffers/reference_counted.cpp b/example/buffers/reference_counted.cpp index 9258f53e..a8dfbbbe 100644 --- a/example/buffers/reference_counted.cpp +++ b/example/buffers/reference_counted.cpp @@ -27,7 +27,7 @@ public: { } - // Implement the Const_Buffers concept. + // Implement the ConstBufferSequence requirements. typedef boost::asio::const_buffer value_type; typedef const boost::asio::const_buffer* const_iterator; const boost::asio::const_buffer* begin() const { return &buffer_; } From e73e772d7ff0585a1a03a2d3c58af2ccfc82733a Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:20:06 +0000 Subject: [PATCH 16/60] Add missing broken pipe error. [SVN r42752] --- include/boost/asio/error.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/asio/error.hpp b/include/boost/asio/error.hpp index 814f33b6..c0142143 100644 --- a/include/boost/asio/error.hpp +++ b/include/boost/asio/error.hpp @@ -71,6 +71,11 @@ enum basic_errors /// Operation already in progress. already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY), + /// Broken pipe. + broken_pipe = BOOST_ASIO_WIN_OR_POSIX( + BOOST_ASIO_NATIVE_ERROR(ERROR_BROKEN_PIPE), + BOOST_ASIO_NATIVE_ERROR(EPIPE)), + /// A connection has been aborted. connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED), From 0481bc277bd03b7a7aacd64f5530733f6c5b55f3 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:21:37 +0000 Subject: [PATCH 17/60] Don't include sys/time.h when compiling with aCC, as that header does not supply pselect(), which is needed for HP-UX/aCC to work correctly. [SVN r42753] --- include/boost/asio/detail/socket_types.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/asio/detail/socket_types.hpp b/include/boost/asio/detail/socket_types.hpp index adcc5a6e..88b0ab30 100644 --- a/include/boost/asio/detail/socket_types.hpp +++ b/include/boost/asio/detail/socket_types.hpp @@ -92,7 +92,7 @@ # include # include # include -# if defined(__hpux) +# if defined(__hpux) && !defined(__HP_aCC) # include # else # include From 66e7e8235b63a3f28a19111fdc7436f1db61e5d5 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:22:21 +0000 Subject: [PATCH 18/60] Disable noisy and incorrect /Wp64 warnings generated by MSVC. [SVN r42754] --- include/boost/asio/detail/push_options.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/asio/detail/push_options.hpp b/include/boost/asio/detail/push_options.hpp index 0b68d293..96ddf7d0 100644 --- a/include/boost/asio/detail/push_options.hpp +++ b/include/boost/asio/detail/push_options.hpp @@ -90,6 +90,12 @@ # pragma warning (disable:4244) # pragma warning (disable:4355) # pragma warning (disable:4675) +# if defined(_M_IX86) && defined(_Wp64) +// The /Wp64 option is broken. If you want to check 64 bit portability, use a +// 64 bit compiler! +# pragma warning (disable:4311) +# pragma warning (disable:4312) +# endif // defined(_M_IX86) && defined(_Wp64) # pragma pack (push, 8) // Note that if the /Og optimisation flag is enabled with MSVC6, the compiler // has a tendency to incorrectly optimise away some calls to member template From d02ff9fd317abc2ca4e8f2d45c3b37b47c4ce0ff Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:24:28 +0000 Subject: [PATCH 19/60] Don't call epoll_wait/kevent if there are no old operations (where old means added prior to the last epoll_wait/kevent call) needing to be demultiplexed. [SVN r42755] --- include/boost/asio/detail/epoll_reactor.hpp | 14 ++++++++++++-- include/boost/asio/detail/kqueue_reactor.hpp | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/include/boost/asio/detail/epoll_reactor.hpp b/include/boost/asio/detail/epoll_reactor.hpp index 6cd72523..3fa36efa 100644 --- a/include/boost/asio/detail/epoll_reactor.hpp +++ b/include/boost/asio/detail/epoll_reactor.hpp @@ -67,7 +67,8 @@ public: pending_cancellations_(), stop_thread_(false), thread_(0), - shutdown_(false) + shutdown_(false), + need_epoll_wait_(true) { // Start the reactor's internal thread only if needed. if (Own_Thread) @@ -388,7 +389,9 @@ private: // Block on the epoll descriptor. epoll_event events[128]; - int num_events = epoll_wait(epoll_fd_, events, 128, timeout); + int num_events = (block || need_epoll_wait_) + ? epoll_wait(epoll_fd_, events, 128, timeout) + : 0; lock.lock(); wait_in_progress_ = false; @@ -479,6 +482,10 @@ private: cancel_ops_unlocked(pending_cancellations_[i]); pending_cancellations_.clear(); + // Determine whether epoll_wait should be called when the reactor next runs. + need_epoll_wait_ = !read_op_queue_.empty() + || !write_op_queue_.empty() || !except_op_queue_.empty(); + cleanup_operations_and_timers(lock); } @@ -633,6 +640,9 @@ private: // Whether the service has been shut down. bool shutdown_; + + // Whether we need to call epoll_wait the next time the reactor is run. + bool need_epoll_wait_; }; } // namespace detail diff --git a/include/boost/asio/detail/kqueue_reactor.hpp b/include/boost/asio/detail/kqueue_reactor.hpp index c4668e7a..04261e83 100644 --- a/include/boost/asio/detail/kqueue_reactor.hpp +++ b/include/boost/asio/detail/kqueue_reactor.hpp @@ -75,7 +75,8 @@ public: pending_cancellations_(), stop_thread_(false), thread_(0), - shutdown_(false) + shutdown_(false), + need_kqueue_wait_(true) { // Start the reactor's internal thread only if needed. if (Own_Thread) @@ -374,7 +375,9 @@ private: // Block on the kqueue descriptor. struct kevent events[128]; - int num_events = kevent(kqueue_fd_, 0, 0, events, 128, timeout); + int num_events = (block || need_kqueue_wait_) + ? kevent(kqueue_fd_, 0, 0, events, 128, timeout) + : 0; lock.lock(); wait_in_progress_ = false; @@ -479,6 +482,10 @@ private: cancel_ops_unlocked(pending_cancellations_[i]); pending_cancellations_.clear(); + // Determine whether kqueue needs to be called next time the reactor is run. + need_kqueue_wait_ = !read_op_queue_.empty() + || !write_op_queue_.empty() || !except_op_queue_.empty(); + cleanup_operations_and_timers(lock); } @@ -631,6 +638,9 @@ private: // Whether the service has been shut down. bool shutdown_; + + // Whether we need to call kqueue the next time the reactor is run. + bool need_kqueue_wait_; }; } // namespace detail From 95e7a5a83fda309cab76e4d05908cac1f1e061fd Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:25:24 +0000 Subject: [PATCH 20/60] Silence some integer truncation warnings. [SVN r42756] --- include/boost/asio/detail/socket_ops.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/boost/asio/detail/socket_ops.hpp b/include/boost/asio/detail/socket_ops.hpp index 7464f19f..af285bee 100644 --- a/include/boost/asio/detail/socket_ops.hpp +++ b/include/boost/asio/detail/socket_ops.hpp @@ -1812,19 +1812,21 @@ inline boost::system::error_code getnameinfo(const socket_addr_type* addr, # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) || defined(UNDER_CE) // Building for Windows XP, Windows Server 2003, or later. clear_error(ec); - int error = ::getnameinfo(addr, addrlen, host, static_cast(hostlen), + int error = ::getnameinfo(addr, static_cast(addrlen), + host, static_cast(hostlen), serv, static_cast(servlen), flags); return ec = translate_addrinfo_error(error); # else // Building for Windows 2000 or earlier. typedef int (WSAAPI *gni_t)(const socket_addr_type*, - int, char*, std::size_t, char*, std::size_t, int); + int, char*, DWORD, char*, DWORD, int); if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32")) { if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo")) { clear_error(ec); - int error = gni(addr, addrlen, host, hostlen, serv, servlen, flags); + int error = gni(addr, addrlen, host, static_cast(hostlen), + serv, static_cast(servlen), flags); return ec = translate_addrinfo_error(error); } } From 08410277899e48ccce484010675ab6c0e3943ee3 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:27:52 +0000 Subject: [PATCH 21/60] Silence some integer truncation warnings. Only perform the windows-bug workaround where we use a short timeout with GetQueuedCompletionStatus from one thread, i.e. the timer thread. Keep track of the number of OVERLAPPED-derived operations to ensure that they all get cleaned up when the io_service is destroyed. [SVN r42758] --- .../boost/asio/detail/win_iocp_io_service.hpp | 104 ++++++++++++++---- .../boost/asio/detail/win_iocp_operation.hpp | 83 -------------- .../asio/detail/win_iocp_socket_service.hpp | 49 ++++----- 3 files changed, 108 insertions(+), 128 deletions(-) delete mode 100644 include/boost/asio/detail/win_iocp_operation.hpp diff --git a/include/boost/asio/detail/win_iocp_io_service.hpp b/include/boost/asio/detail/win_iocp_io_service.hpp index 287a52b3..b9ab033b 100644 --- a/include/boost/asio/detail/win_iocp_io_service.hpp +++ b/include/boost/asio/detail/win_iocp_io_service.hpp @@ -34,7 +34,6 @@ #include #include #include -#include #include namespace boost { @@ -45,14 +44,64 @@ class win_iocp_io_service : public boost::asio::detail::service_base { public: - // Base class for all operations. - typedef win_iocp_operation operation; + // Base class for all operations. A function pointer is used instead of + // virtual functions to avoid the associated overhead. + // + // This class inherits from OVERLAPPED so that we can downcast to get back to + // the operation pointer from the LPOVERLAPPED out parameter of + // GetQueuedCompletionStatus. + class operation + : public OVERLAPPED + { + public: + typedef void (*invoke_func_type)(operation*, DWORD, size_t); + typedef void (*destroy_func_type)(operation*); + + operation(win_iocp_io_service& iocp_service, + invoke_func_type invoke_func, destroy_func_type destroy_func) + : outstanding_operations_(&iocp_service.outstanding_operations_), + invoke_func_(invoke_func), + destroy_func_(destroy_func) + { + Internal = 0; + InternalHigh = 0; + Offset = 0; + OffsetHigh = 0; + hEvent = 0; + + ::InterlockedIncrement(outstanding_operations_); + } + + void do_completion(DWORD last_error, size_t bytes_transferred) + { + invoke_func_(this, last_error, bytes_transferred); + } + + void destroy() + { + destroy_func_(this); + } + + protected: + // Prevent deletion through this type. + ~operation() + { + ::InterlockedDecrement(outstanding_operations_); + } + + private: + long* outstanding_operations_; + invoke_func_type invoke_func_; + destroy_func_type destroy_func_; + }; + // Constructor. win_iocp_io_service(boost::asio::io_service& io_service) : boost::asio::detail::service_base(io_service), iocp_(), outstanding_work_(0), + outstanding_operations_(0), stopped_(0), shutdown_(0), timer_thread_(0), @@ -80,7 +129,7 @@ public: { ::InterlockedExchange(&shutdown_, 1); - for (;;) + while (::InterlockedExchangeAdd(&outstanding_operations_, 0) > 0) { DWORD bytes_transferred = 0; #if (WINVER < 0x0500) @@ -89,12 +138,8 @@ public: DWORD_PTR completion_key = 0; #endif LPOVERLAPPED overlapped = 0; - ::SetLastError(0); - BOOL ok = ::GetQueuedCompletionStatus(iocp_.handle, - &bytes_transferred, &completion_key, &overlapped, 0); - DWORD last_error = ::GetLastError(); - if (!ok && overlapped == 0 && last_error == WAIT_TIMEOUT) - break; + ::GetQueuedCompletionStatus(iocp_.handle, &bytes_transferred, + &completion_key, &overlapped, INFINITE); if (overlapped) static_cast(overlapped)->destroy(); } @@ -250,7 +295,7 @@ public: } // Request invocation of the given OVERLAPPED-derived operation. - void post_completion(win_iocp_operation* op, DWORD op_last_error, + void post_completion(operation* op, DWORD op_last_error, DWORD bytes_transferred) { // Enqueue the operation on the I/O completion port. @@ -348,7 +393,7 @@ private: &timer_thread_, this_thread_id, 0) == 0); // Calculate timeout for GetQueuedCompletionStatus call. - DWORD timeout = max_timeout; + DWORD timeout = INFINITE; if (dispatching_timers) { boost::asio::detail::mutex::scoped_lock lock(timer_mutex_); @@ -372,13 +417,28 @@ private: // Dispatch any pending timers. if (dispatching_timers) { - boost::asio::detail::mutex::scoped_lock lock(timer_mutex_); - timer_queues_copy_ = timer_queues_; - for (std::size_t i = 0; i < timer_queues_.size(); ++i) + try { - timer_queues_[i]->dispatch_timers(); - timer_queues_[i]->dispatch_cancellations(); - timer_queues_[i]->cleanup_timers(); + boost::asio::detail::mutex::scoped_lock lock(timer_mutex_); + timer_queues_copy_ = timer_queues_; + for (std::size_t i = 0; i < timer_queues_.size(); ++i) + { + timer_queues_[i]->dispatch_timers(); + timer_queues_[i]->dispatch_cancellations(); + timer_queues_[i]->cleanup_timers(); + } + } + catch (...) + { + // Transfer responsibility for dispatching timers to another thread. + if (::InterlockedCompareExchange(&timer_thread_, + 0, this_thread_id) == this_thread_id) + { + ::PostQueuedCompletionStatus(iocp_.handle, + 0, transfer_timer_dispatching, 0); + } + + throw; } } @@ -533,7 +593,7 @@ private: { handler_operation(win_iocp_io_service& io_service, Handler handler) - : operation(&handler_operation::do_completion_impl, + : operation(io_service, &handler_operation::do_completion_impl, &handler_operation::destroy_impl), io_service_(io_service), handler_(handler) @@ -594,6 +654,10 @@ private: // The count of unfinished work. long outstanding_work_; + // The count of unfinished operations. + long outstanding_operations_; + friend class operation; + // Flag to indicate whether the event loop has been stopped. long stopped_; @@ -603,7 +667,7 @@ private: enum { // Maximum GetQueuedCompletionStatus timeout, in milliseconds. - max_timeout = 1000, + max_timeout = 500, // Completion key value to indicate that responsibility for dispatching // timers is being cooperatively transferred from one thread to another. diff --git a/include/boost/asio/detail/win_iocp_operation.hpp b/include/boost/asio/detail/win_iocp_operation.hpp deleted file mode 100644 index 3bd57e5a..00000000 --- a/include/boost/asio/detail/win_iocp_operation.hpp +++ /dev/null @@ -1,83 +0,0 @@ -// -// win_iocp_operation.hpp -// ~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP -#define BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include - -#include - -#if defined(BOOST_ASIO_HAS_IOCP) - -#include - -namespace boost { -namespace asio { -namespace detail { - -// Base class for all IOCP operations. A function pointer is used instead of -// virtual functions to avoid the associated overhead. -// -// This class inherits from OVERLAPPED so that we can downcast to get back to -// the win_iocp_operation pointer from the LPOVERLAPPED out parameter of -// GetQueuedCompletionStatus. -struct win_iocp_operation - : public OVERLAPPED -{ - typedef void (*invoke_func_type)(win_iocp_operation*, DWORD, size_t); - typedef void (*destroy_func_type)(win_iocp_operation*); - - win_iocp_operation(invoke_func_type invoke_func, - destroy_func_type destroy_func) - : invoke_func_(invoke_func), - destroy_func_(destroy_func) - { - Internal = 0; - InternalHigh = 0; - Offset = 0; - OffsetHigh = 0; - hEvent = 0; - } - - void do_completion(DWORD last_error, size_t bytes_transferred) - { - invoke_func_(this, last_error, bytes_transferred); - } - - void destroy() - { - destroy_func_(this); - } - -protected: - // Prevent deletion through this type. - ~win_iocp_operation() - { - } - -private: - invoke_func_type invoke_func_; - destroy_func_type destroy_func_; -}; - -} // namespace detail -} // namespace asio -} // namespace boost - -#endif // defined(BOOST_ASIO_HAS_IOCP) - -#include - -#endif // BOOST_ASIO_DETAIL_WIN_IOCP_OPERATION_HPP diff --git a/include/boost/asio/detail/win_iocp_socket_service.hpp b/include/boost/asio/detail/win_iocp_socket_service.hpp index 31ea7006..96dc01aa 100644 --- a/include/boost/asio/detail/win_iocp_socket_service.hpp +++ b/include/boost/asio/detail/win_iocp_socket_service.hpp @@ -57,7 +57,7 @@ public: typedef typename Protocol::endpoint endpoint_type; // Base class for all operations. - typedef win_iocp_operation operation; + typedef win_iocp_io_service::operation operation; struct noop_deleter { void operator()(void*) {} }; typedef boost::shared_ptr shared_cancel_token_type; @@ -681,13 +681,13 @@ public: : public operation { public: - send_operation(boost::asio::io_service& io_service, + send_operation(win_iocp_io_service& io_service, weak_cancel_token_type cancel_token, const ConstBufferSequence& buffers, Handler handler) - : operation( + : operation(io_service, &send_operation::do_completion_impl, &send_operation::destroy_impl), - work_(io_service), + work_(io_service.get_io_service()), cancel_token_(cancel_token), buffers_(buffers), handler_(handler) @@ -783,8 +783,8 @@ public: typedef send_operation value_type; typedef handler_alloc_traits alloc_traits; raw_handler_ptr raw_ptr(handler); - handler_ptr ptr(raw_ptr, - this->get_io_service(), impl.cancel_token_, buffers, handler); + handler_ptr ptr(raw_ptr, iocp_service_, + impl.cancel_token_, buffers, handler); // Copy buffers into WSABUF array. ::WSABUF bufs[max_buffers]; @@ -861,7 +861,7 @@ public: // Send the data. DWORD bytes_transferred = 0; int result = ::WSASendTo(impl.socket_, bufs, i, &bytes_transferred, - flags, destination.data(), destination.size(), 0, 0); + flags, destination.data(), static_cast(destination.size()), 0, 0); if (result != 0) { DWORD last_error = ::WSAGetLastError(); @@ -881,12 +881,12 @@ public: : public operation { public: - send_to_operation(boost::asio::io_service& io_service, + send_to_operation(win_iocp_io_service& io_service, const ConstBufferSequence& buffers, Handler handler) - : operation( + : operation(io_service, &send_to_operation::do_completion_impl, &send_to_operation::destroy_impl), - work_(io_service), + work_(io_service.get_io_service()), buffers_(buffers), handler_(handler) { @@ -974,8 +974,7 @@ public: typedef send_to_operation value_type; typedef handler_alloc_traits alloc_traits; raw_handler_ptr raw_ptr(handler); - handler_ptr ptr(raw_ptr, - this->get_io_service(), buffers, handler); + handler_ptr ptr(raw_ptr, iocp_service_, buffers, handler); // Copy buffers into WSABUF array. ::WSABUF bufs[max_buffers]; @@ -992,8 +991,8 @@ public: // Send the data. DWORD bytes_transferred = 0; - int result = ::WSASendTo(impl.socket_, bufs, i, &bytes_transferred, - flags, destination.data(), destination.size(), ptr.get(), 0); + int result = ::WSASendTo(impl.socket_, bufs, i, &bytes_transferred, flags, + destination.data(), static_cast(destination.size()), ptr.get(), 0); DWORD last_error = ::WSAGetLastError(); // Check if the operation completed immediately. @@ -1075,15 +1074,15 @@ public: : public operation { public: - receive_operation(boost::asio::io_service& io_service, + receive_operation(win_iocp_io_service& io_service, weak_cancel_token_type cancel_token, const MutableBufferSequence& buffers, Handler handler) - : operation( + : operation(io_service, &receive_operation< MutableBufferSequence, Handler>::do_completion_impl, &receive_operation< MutableBufferSequence, Handler>::destroy_impl), - work_(io_service), + work_(io_service.get_io_service()), cancel_token_(cancel_token), buffers_(buffers), handler_(handler) @@ -1186,8 +1185,8 @@ public: typedef receive_operation value_type; typedef handler_alloc_traits alloc_traits; raw_handler_ptr raw_ptr(handler); - handler_ptr ptr(raw_ptr, - this->get_io_service(), impl.cancel_token_, buffers, handler); + handler_ptr ptr(raw_ptr, iocp_service_, + impl.cancel_token_, buffers, handler); // Copy buffers into WSABUF array. ::WSABUF bufs[max_buffers]; @@ -1291,17 +1290,17 @@ public: : public operation { public: - receive_from_operation(boost::asio::io_service& io_service, + receive_from_operation(win_iocp_io_service& io_service, endpoint_type& endpoint, const MutableBufferSequence& buffers, Handler handler) - : operation( + : operation(io_service, &receive_from_operation< MutableBufferSequence, Handler>::do_completion_impl, &receive_from_operation< MutableBufferSequence, Handler>::destroy_impl), endpoint_(endpoint), endpoint_size_(static_cast(endpoint.capacity())), - work_(io_service), + work_(io_service.get_io_service()), buffers_(buffers), handler_(handler) { @@ -1406,8 +1405,8 @@ public: typedef receive_from_operation value_type; typedef handler_alloc_traits alloc_traits; raw_handler_ptr raw_ptr(handler); - handler_ptr ptr(raw_ptr, - this->get_io_service(), sender_endp, buffers, handler); + handler_ptr ptr(raw_ptr, iocp_service_, + sender_endp, buffers, handler); // Copy buffers into WSABUF array. ::WSABUF bufs[max_buffers]; @@ -1509,7 +1508,7 @@ public: socket_type socket, socket_type new_socket, Socket& peer, const protocol_type& protocol, endpoint_type* peer_endpoint, bool enable_connection_aborted, Handler handler) - : operation( + : operation(io_service, &accept_operation::do_completion_impl, &accept_operation::destroy_impl), io_service_(io_service), From 1f215cd262f523d14da9eea37e7a60c462e27ce5 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 14 Jan 2008 13:29:08 +0000 Subject: [PATCH 22/60] Check for truncation when converting buffer size from size_t to openssl's int argument. Try to fix possible thread-safety issues in SSL wrapper. [SVN r42759] --- .../asio/ssl/detail/openssl_operation.hpp | 43 +++++++++------ .../ssl/detail/openssl_stream_service.hpp | 53 ++++++++++++++----- 2 files changed, 68 insertions(+), 28 deletions(-) diff --git a/include/boost/asio/ssl/detail/openssl_operation.hpp b/include/boost/asio/ssl/detail/openssl_operation.hpp index 690d1fbd..b4ce6fb0 100644 --- a/include/boost/asio/ssl/detail/openssl_operation.hpp +++ b/include/boost/asio/ssl/detail/openssl_operation.hpp @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -88,10 +89,12 @@ public: net_buffer& recv_buf, SSL* session, BIO* ssl_bio, - user_handler_func handler + user_handler_func handler, + boost::asio::io_service::strand& strand ) : primitive_(primitive) , user_handler_(handler) + , strand_(&strand) , recv_buf_(recv_buf) , socket_(socket) , ssl_bio_(ssl_bio) @@ -118,6 +121,7 @@ public: SSL* session, BIO* ssl_bio) : primitive_(primitive) + , strand_(0) , recv_buf_(recv_buf) , socket_(socket) , ssl_bio_(ssl_bio) @@ -241,6 +245,7 @@ private: ssl_primitive_func primitive_; user_handler_func user_handler_; + boost::asio::io_service::strand* strand_; write_func write_; read_func read_; int_handler_func handler_; @@ -304,19 +309,23 @@ private: { unsigned char *data_start = send_buf_.get_unused_start(); send_buf_.data_added(len); - + + BOOST_ASSERT(strand_); boost::asio::async_write ( socket_, boost::asio::buffer(data_start, len), - boost::bind + strand_->wrap ( - &openssl_operation::async_write_handler, - this, - is_operation_done, - rc, - boost::asio::placeholders::error, - boost::asio::placeholders::bytes_transferred + boost::bind + ( + &openssl_operation::async_write_handler, + this, + is_operation_done, + rc, + boost::asio::placeholders::error, + boost::asio::placeholders::bytes_transferred + ) ) ); @@ -366,17 +375,21 @@ private: int do_async_read() { // Wait for new data + BOOST_ASSERT(strand_); socket_.async_read_some ( boost::asio::buffer(recv_buf_.get_unused_start(), recv_buf_.get_unused_len()), - boost::bind + strand_->wrap ( - &openssl_operation::async_read_handler, - this, - boost::asio::placeholders::error, - boost::asio::placeholders::bytes_transferred - ) + boost::bind + ( + &openssl_operation::async_read_handler, + this, + boost::asio::placeholders::error, + boost::asio::placeholders::bytes_transferred + ) + ) ); return 0; } diff --git a/include/boost/asio/ssl/detail/openssl_stream_service.hpp b/include/boost/asio/ssl/detail/openssl_stream_service.hpp index f7852bdc..2df8e706 100644 --- a/include/boost/asio/ssl/detail/openssl_stream_service.hpp +++ b/include/boost/asio/ssl/detail/openssl_stream_service.hpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -28,6 +29,7 @@ #include #include +#include #include #include #include @@ -43,6 +45,8 @@ class openssl_stream_service : public boost::asio::detail::service_base { private: + enum { max_buffer_size = INT_MAX }; + //Base handler for asyncrhonous operations template class base_handler @@ -161,7 +165,8 @@ public: // Construct a new stream socket service for the specified io_service. explicit openssl_stream_service(boost::asio::io_service& io_service) - : boost::asio::detail::service_base(io_service) + : boost::asio::detail::service_base(io_service), + strand_(io_service) { } @@ -256,11 +261,12 @@ public: local_handler, boost::arg<1>(), boost::arg<2>() - ) + ), + strand_ ); local_handler->set_operation(op); - get_io_service().post(boost::bind(&openssl_operation::start, op)); + strand_.post(boost::bind(&openssl_operation::start, op)); } // Shut down SSL on the stream. @@ -310,11 +316,12 @@ public: local_handler, boost::arg<1>(), boost::arg<2>() - ) + ), + strand_ ); local_handler->set_operation(op); - get_io_service().post(boost::bind(&openssl_operation::start, op)); + strand_.post(boost::bind(&openssl_operation::start, op)); } // Write some data to the stream. @@ -325,10 +332,14 @@ public: size_t bytes_transferred = 0; try { + std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin()); + if (buffer_size > max_buffer_size) + buffer_size = max_buffer_size; + boost::function send_func = boost::bind(&::SSL_write, boost::arg<1>(), boost::asio::buffer_cast(*buffers.begin()), - static_cast(boost::asio::buffer_size(*buffers.begin()))); + static_cast(buffer_size)); openssl_operation op( send_func, next_layer, @@ -357,10 +368,14 @@ public: send_handler* local_handler = new send_handler(handler, get_io_service()); + std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin()); + if (buffer_size > max_buffer_size) + buffer_size = max_buffer_size; + boost::function send_func = boost::bind(&::SSL_write, boost::arg<1>(), boost::asio::buffer_cast(*buffers.begin()), - static_cast(boost::asio::buffer_size(*buffers.begin()))); + static_cast(buffer_size)); openssl_operation* op = new openssl_operation ( @@ -375,11 +390,12 @@ public: local_handler, boost::arg<1>(), boost::arg<2>() - ) + ), + strand_ ); local_handler->set_operation(op); - get_io_service().post(boost::bind(&openssl_operation::start, op)); + strand_.post(boost::bind(&openssl_operation::start, op)); } // Read some data from the stream. @@ -390,10 +406,14 @@ public: size_t bytes_transferred = 0; try { + std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin()); + if (buffer_size > max_buffer_size) + buffer_size = max_buffer_size; + boost::function recv_func = boost::bind(&::SSL_read, boost::arg<1>(), boost::asio::buffer_cast(*buffers.begin()), - boost::asio::buffer_size(*buffers.begin())); + static_cast(buffer_size)); openssl_operation op(recv_func, next_layer, impl->recv_buf, @@ -422,10 +442,14 @@ public: recv_handler* local_handler = new recv_handler(handler, get_io_service()); + std::size_t buffer_size = boost::asio::buffer_size(*buffers.begin()); + if (buffer_size > max_buffer_size) + buffer_size = max_buffer_size; + boost::function recv_func = boost::bind(&::SSL_read, boost::arg<1>(), boost::asio::buffer_cast(*buffers.begin()), - boost::asio::buffer_size(*buffers.begin())); + static_cast(buffer_size)); openssl_operation* op = new openssl_operation ( @@ -440,11 +464,12 @@ public: local_handler, boost::arg<1>(), boost::arg<2>() - ) + ), + strand_ ); local_handler->set_operation(op); - get_io_service().post(boost::bind(&openssl_operation::start, op)); + strand_.post(boost::bind(&openssl_operation::start, op)); } // Peek at the incoming data on the stream. @@ -466,6 +491,8 @@ public: } private: + boost::asio::io_service::strand strand_; + typedef boost::asio::detail::mutex mutex_type; template From 0b2607735642e5d038933f5df5a67d0c6b463557 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 16 Jan 2008 13:46:01 +0000 Subject: [PATCH 23/60] Set the openssl callback function for getting a thread ID. [SVN r42817] --- include/boost/asio/ssl/detail/openssl_init.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/boost/asio/ssl/detail/openssl_init.hpp b/include/boost/asio/ssl/detail/openssl_init.hpp index d8011934..63f21a4b 100644 --- a/include/boost/asio/ssl/detail/openssl_init.hpp +++ b/include/boost/asio/ssl/detail/openssl_init.hpp @@ -20,10 +20,12 @@ #include #include +#include #include #include #include +#include #include namespace boost { @@ -52,6 +54,7 @@ private: for (size_t i = 0; i < mutexes_.size(); ++i) mutexes_[i].reset(new boost::asio::detail::mutex); ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func); + ::CRYPTO_set_id_callback(&do_init::openssl_id_func); } } @@ -59,6 +62,7 @@ private: { if (Do_Init) { + ::CRYPTO_set_id_callback(0); ::CRYPTO_set_locking_callback(0); ::ERR_free_strings(); ::ERR_remove_state(0); @@ -81,6 +85,15 @@ private: } private: + static unsigned long openssl_id_func() + { + void* id = instance()->thread_id_; + if (id == 0) + instance()->thread_id_ = id = &id; // Ugh. + BOOST_ASSERT(sizeof(unsigned long) >= sizeof(void*)); + return reinterpret_cast(id); + } + static void openssl_locking_func(int mode, int n, const char *file, int line) { @@ -92,6 +105,9 @@ private: // Mutexes to be used in locking callbacks. std::vector > mutexes_; + + // The thread identifiers to be used by openssl. + boost::asio::detail::tss_ptr thread_id_; }; public: From f50757120a9fa4aa0240e78bb9c7a33a3852471f Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Sat, 2 Feb 2008 11:37:45 +0000 Subject: [PATCH 24/60] Ensure that the workaround for the MSVC secure iterator problem is only used when compiling with MSVC. The workaround causes g++'s library debug mode to report errors due to the assignment from a singular iterator. [SVN r43054] --- include/boost/asio/buffer.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/asio/buffer.hpp b/include/boost/asio/buffer.hpp index ff28fa58..eec06c42 100644 --- a/include/boost/asio/buffer.hpp +++ b/include/boost/asio/buffer.hpp @@ -393,7 +393,12 @@ public: ~buffer_debug_check() { +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) + // MSVC's string iterator checking may crash in a std::string::iterator + // object's destructor when the iterator points to an already-destroyed + // std::string object, unless the iterator is cleared first. iter_ = Iterator(); +#endif // BOOST_WORKAROUND(BOOST_MSVC, >= 1400) } void operator()() From 57f75e9a241346c494a599eb8aecdb9c2ff92947 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Sat, 2 Feb 2008 11:39:17 +0000 Subject: [PATCH 25/60] Fix "possible loss of data" warning when building for Windows 2000 targets. [SVN r43055] --- include/boost/asio/detail/socket_ops.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/asio/detail/socket_ops.hpp b/include/boost/asio/detail/socket_ops.hpp index af285bee..5a346c65 100644 --- a/include/boost/asio/detail/socket_ops.hpp +++ b/include/boost/asio/detail/socket_ops.hpp @@ -1825,7 +1825,8 @@ inline boost::system::error_code getnameinfo(const socket_addr_type* addr, if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo")) { clear_error(ec); - int error = gni(addr, addrlen, host, static_cast(hostlen), + int error = gni(addr, static_cast(addrlen), + host, static_cast(hostlen), serv, static_cast(servlen), flags); return ec = translate_addrinfo_error(error); } From 697ef44e1ce78e5c93ddb76252da95816d7429cd Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Sat, 2 Feb 2008 12:02:23 +0000 Subject: [PATCH 26/60] The latest Windows SDKs don't support IPv6 when building for Windows 2000, so we need to use the SDK emulation in that case. [SVN r43056] --- include/boost/asio/detail/old_win_sdk_compat.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/boost/asio/detail/old_win_sdk_compat.hpp b/include/boost/asio/detail/old_win_sdk_compat.hpp index 1daacacc..707177bb 100644 --- a/include/boost/asio/detail/old_win_sdk_compat.hpp +++ b/include/boost/asio/detail/old_win_sdk_compat.hpp @@ -31,6 +31,10 @@ #if defined(BOOST_ASIO_HAS_OLD_WIN_SDK) // Emulation of types that are missing from old Platform SDKs. +// +// N.B. this emulation is also used if building for a Windows 2000 target with +// a recent (i.e. Vista or later) SDK, as the SDK does not provide IPv6 support +// in that case. namespace boost { namespace asio { @@ -55,9 +59,19 @@ struct sockaddr_storage_emulation struct in6_addr_emulation { - u_char s6_addr[16]; + union + { + u_char Byte[16]; + u_short Word[8]; + } u; }; +#if !defined(s6_addr) +# define _S6_un u +# define _S6_u8 Byte +# define s6_addr _S6_un._S6_u8 +#endif // !defined(s6_addr) + struct sockaddr_in6_emulation { short sin6_family; From 86dc84f36d1c984beb8393cb7f37ce7ffd94c153 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 11 Feb 2008 13:59:44 +0000 Subject: [PATCH 27/60] Need to define _XOPEN_SOURCE_EXTENDED when compiling for HP-UX. [SVN r43221] --- example/allocation/Jamfile.v2 | 1 + example/buffers/Jamfile.v2 | 1 + example/chat/Jamfile.v2 | 1 + example/echo/Jamfile.v2 | 1 + example/http/client/Jamfile.v2 | 1 + example/http/server/Jamfile.v2 | 1 + example/http/server2/Jamfile.v2 | 1 + example/http/server3/Jamfile.v2 | 1 + example/invocation/Jamfile.v2 | 1 + example/iostreams/Jamfile.v2 | 1 + example/multicast/Jamfile.v2 | 1 + example/serialization/Jamfile.v2 | 1 + example/services/Jamfile.v2 | 1 + example/socks4/Jamfile.v2 | 1 + example/ssl/Jamfile.v2 | 1 + example/timeouts/Jamfile.v2 | 1 + example/timers/Jamfile.v2 | 1 + example/tutorial/Jamfile.v2 | 1 + test/Jamfile.v2 | 1 + test/ssl/Jamfile.v2 | 1 + 20 files changed, 20 insertions(+) diff --git a/example/allocation/Jamfile.v2 b/example/allocation/Jamfile.v2 index b996de7a..5219ac8a 100644 --- a/example/allocation/Jamfile.v2 +++ b/example/allocation/Jamfile.v2 @@ -33,5 +33,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/buffers/Jamfile.v2 b/example/buffers/Jamfile.v2 index e93a46a0..6d783a06 100644 --- a/example/buffers/Jamfile.v2 +++ b/example/buffers/Jamfile.v2 @@ -33,5 +33,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/chat/Jamfile.v2 b/example/chat/Jamfile.v2 index 75cc0ad2..9326f380 100644 --- a/example/chat/Jamfile.v2 +++ b/example/chat/Jamfile.v2 @@ -34,6 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/echo/Jamfile.v2 b/example/echo/Jamfile.v2 index af0e6675..14872dee 100644 --- a/example/echo/Jamfile.v2 +++ b/example/echo/Jamfile.v2 @@ -34,6 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/client/Jamfile.v2 b/example/http/client/Jamfile.v2 index 394e3c5c..ae6ecef1 100644 --- a/example/http/client/Jamfile.v2 +++ b/example/http/client/Jamfile.v2 @@ -33,6 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/server/Jamfile.v2 b/example/http/server/Jamfile.v2 index 7703b600..0f3caee4 100644 --- a/example/http/server/Jamfile.v2 +++ b/example/http/server/Jamfile.v2 @@ -42,5 +42,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/server2/Jamfile.v2 b/example/http/server2/Jamfile.v2 index cb4e444e..658c464b 100644 --- a/example/http/server2/Jamfile.v2 +++ b/example/http/server2/Jamfile.v2 @@ -42,5 +42,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/server3/Jamfile.v2 b/example/http/server3/Jamfile.v2 index 6466a338..02fc39ab 100644 --- a/example/http/server3/Jamfile.v2 +++ b/example/http/server3/Jamfile.v2 @@ -41,5 +41,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/invocation/Jamfile.v2 b/example/invocation/Jamfile.v2 index 378a0f9a..9fd362d9 100644 --- a/example/invocation/Jamfile.v2 +++ b/example/invocation/Jamfile.v2 @@ -33,5 +33,6 @@ exe prioritised_handlers NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/iostreams/Jamfile.v2 b/example/iostreams/Jamfile.v2 index b7a16011..acf8dc46 100644 --- a/example/iostreams/Jamfile.v2 +++ b/example/iostreams/Jamfile.v2 @@ -33,6 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/multicast/Jamfile.v2 b/example/multicast/Jamfile.v2 index 0fe34c62..6f56d2c8 100644 --- a/example/multicast/Jamfile.v2 +++ b/example/multicast/Jamfile.v2 @@ -33,6 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/serialization/Jamfile.v2 b/example/serialization/Jamfile.v2 index 22d07db7..cb9bd905 100644 --- a/example/serialization/Jamfile.v2 +++ b/example/serialization/Jamfile.v2 @@ -34,6 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/services/Jamfile.v2 b/example/services/Jamfile.v2 index 66ee9161..222df0bf 100644 --- a/example/services/Jamfile.v2 +++ b/example/services/Jamfile.v2 @@ -35,5 +35,6 @@ exe daytime_client NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/socks4/Jamfile.v2 b/example/socks4/Jamfile.v2 index 861f0610..51b17a14 100644 --- a/example/socks4/Jamfile.v2 +++ b/example/socks4/Jamfile.v2 @@ -33,5 +33,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/ssl/Jamfile.v2 b/example/ssl/Jamfile.v2 index 73ebc4c4..208c7c24 100644 --- a/example/ssl/Jamfile.v2 +++ b/example/ssl/Jamfile.v2 @@ -44,6 +44,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ssl crypto diff --git a/example/timeouts/Jamfile.v2 b/example/timeouts/Jamfile.v2 index 507f89ba..c6071cc4 100644 --- a/example/timeouts/Jamfile.v2 +++ b/example/timeouts/Jamfile.v2 @@ -33,6 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/timers/Jamfile.v2 b/example/timers/Jamfile.v2 index b30be9f0..187ed6a4 100644 --- a/example/timers/Jamfile.v2 +++ b/example/timers/Jamfile.v2 @@ -33,6 +33,7 @@ exe time_t_timer NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/tutorial/Jamfile.v2 b/example/tutorial/Jamfile.v2 index 6440c6be..de10ceec 100644 --- a/example/tutorial/Jamfile.v2 +++ b/example/tutorial/Jamfile.v2 @@ -34,6 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 1bcd9293..c91553ee 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -47,6 +47,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/test/ssl/Jamfile.v2 b/test/ssl/Jamfile.v2 index a090db28..aa9f50b5 100644 --- a/test/ssl/Jamfile.v2 +++ b/test/ssl/Jamfile.v2 @@ -44,6 +44,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS + HPUX:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; From 1a1f24c49f99def84277b8991b543d298c144e7c Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 18 Feb 2008 13:31:26 +0000 Subject: [PATCH 28/60] Fix printing of error messages. [SVN r43301] --- example/http/client/async_client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/http/client/async_client.cpp b/example/http/client/async_client.cpp index 99daf5e3..7d91fad4 100644 --- a/example/http/client/async_client.cpp +++ b/example/http/client/async_client.cpp @@ -83,7 +83,7 @@ private: } else { - std::cout << "Error: " << err << "\n"; + std::cout << "Error: " << err.message() << "\n"; } } @@ -98,7 +98,7 @@ private: } else { - std::cout << "Error: " << err << "\n"; + std::cout << "Error: " << err.message() << "\n"; } } From ff29c1bcfb062e45903d7bd9dcba1ea022cc8ef5 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 18 Feb 2008 13:33:23 +0000 Subject: [PATCH 29/60] Only define _XOPEN_SOURCE_EXTENDED when building with gcc on HP-UX. [SVN r43302] --- example/allocation/Jamfile.v2 | 2 +- example/buffers/Jamfile.v2 | 2 +- example/chat/Jamfile.v2 | 2 +- example/echo/Jamfile.v2 | 2 +- example/http/client/Jamfile.v2 | 2 +- example/http/server/Jamfile.v2 | 2 +- example/http/server2/Jamfile.v2 | 2 +- example/http/server3/Jamfile.v2 | 2 +- example/invocation/Jamfile.v2 | 2 +- example/iostreams/Jamfile.v2 | 2 +- example/multicast/Jamfile.v2 | 2 +- example/serialization/Jamfile.v2 | 2 +- example/services/Jamfile.v2 | 2 +- example/socks4/Jamfile.v2 | 2 +- example/ssl/Jamfile.v2 | 2 +- example/timeouts/Jamfile.v2 | 2 +- example/timers/Jamfile.v2 | 2 +- example/tutorial/Jamfile.v2 | 2 +- test/Jamfile.v2 | 2 +- test/ssl/Jamfile.v2 | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/example/allocation/Jamfile.v2 b/example/allocation/Jamfile.v2 index 5219ac8a..8e8cbee1 100644 --- a/example/allocation/Jamfile.v2 +++ b/example/allocation/Jamfile.v2 @@ -33,6 +33,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/buffers/Jamfile.v2 b/example/buffers/Jamfile.v2 index 6d783a06..ab25c004 100644 --- a/example/buffers/Jamfile.v2 +++ b/example/buffers/Jamfile.v2 @@ -33,6 +33,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/chat/Jamfile.v2 b/example/chat/Jamfile.v2 index 9326f380..13fd9930 100644 --- a/example/chat/Jamfile.v2 +++ b/example/chat/Jamfile.v2 @@ -34,7 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/echo/Jamfile.v2 b/example/echo/Jamfile.v2 index 14872dee..9af1cd9b 100644 --- a/example/echo/Jamfile.v2 +++ b/example/echo/Jamfile.v2 @@ -34,7 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/client/Jamfile.v2 b/example/http/client/Jamfile.v2 index ae6ecef1..349d89d9 100644 --- a/example/http/client/Jamfile.v2 +++ b/example/http/client/Jamfile.v2 @@ -33,7 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/server/Jamfile.v2 b/example/http/server/Jamfile.v2 index 0f3caee4..1a60e7e5 100644 --- a/example/http/server/Jamfile.v2 +++ b/example/http/server/Jamfile.v2 @@ -42,6 +42,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/server2/Jamfile.v2 b/example/http/server2/Jamfile.v2 index 658c464b..a284b66b 100644 --- a/example/http/server2/Jamfile.v2 +++ b/example/http/server2/Jamfile.v2 @@ -42,6 +42,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/http/server3/Jamfile.v2 b/example/http/server3/Jamfile.v2 index 02fc39ab..62187cbd 100644 --- a/example/http/server3/Jamfile.v2 +++ b/example/http/server3/Jamfile.v2 @@ -41,6 +41,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/invocation/Jamfile.v2 b/example/invocation/Jamfile.v2 index 9fd362d9..f9978392 100644 --- a/example/invocation/Jamfile.v2 +++ b/example/invocation/Jamfile.v2 @@ -33,6 +33,6 @@ exe prioritised_handlers NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/iostreams/Jamfile.v2 b/example/iostreams/Jamfile.v2 index acf8dc46..becd9e09 100644 --- a/example/iostreams/Jamfile.v2 +++ b/example/iostreams/Jamfile.v2 @@ -33,7 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/multicast/Jamfile.v2 b/example/multicast/Jamfile.v2 index 6f56d2c8..4b54c3e0 100644 --- a/example/multicast/Jamfile.v2 +++ b/example/multicast/Jamfile.v2 @@ -33,7 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/serialization/Jamfile.v2 b/example/serialization/Jamfile.v2 index cb9bd905..f833d60f 100644 --- a/example/serialization/Jamfile.v2 +++ b/example/serialization/Jamfile.v2 @@ -34,7 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/services/Jamfile.v2 b/example/services/Jamfile.v2 index 222df0bf..a8c6afd7 100644 --- a/example/services/Jamfile.v2 +++ b/example/services/Jamfile.v2 @@ -35,6 +35,6 @@ exe daytime_client NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/socks4/Jamfile.v2 b/example/socks4/Jamfile.v2 index 51b17a14..4c10d7cf 100644 --- a/example/socks4/Jamfile.v2 +++ b/example/socks4/Jamfile.v2 @@ -33,6 +33,6 @@ exe server NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/ssl/Jamfile.v2 b/example/ssl/Jamfile.v2 index 208c7c24..2ccafd9e 100644 --- a/example/ssl/Jamfile.v2 +++ b/example/ssl/Jamfile.v2 @@ -44,7 +44,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ssl crypto diff --git a/example/timeouts/Jamfile.v2 b/example/timeouts/Jamfile.v2 index c6071cc4..c6acbc16 100644 --- a/example/timeouts/Jamfile.v2 +++ b/example/timeouts/Jamfile.v2 @@ -33,7 +33,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/timers/Jamfile.v2 b/example/timers/Jamfile.v2 index 187ed6a4..01cf6cd6 100644 --- a/example/timers/Jamfile.v2 +++ b/example/timers/Jamfile.v2 @@ -33,7 +33,7 @@ exe time_t_timer NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/example/tutorial/Jamfile.v2 b/example/tutorial/Jamfile.v2 index de10ceec..1ea4ce16 100644 --- a/example/tutorial/Jamfile.v2 +++ b/example/tutorial/Jamfile.v2 @@ -34,7 +34,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index c91553ee..5f35df30 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -47,7 +47,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; diff --git a/test/ssl/Jamfile.v2 b/test/ssl/Jamfile.v2 index aa9f50b5..217944cd 100644 --- a/test/ssl/Jamfile.v2 +++ b/test/ssl/Jamfile.v2 @@ -44,7 +44,7 @@ project NT,gcc:ws2_32 NT,gcc:mswsock NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX:_XOPEN_SOURCE_EXTENDED + HPUX,gcc:_XOPEN_SOURCE_EXTENDED HPUX:ipv6 ; From 8e218007b0ba356e8c2eb65e199be3a92e606e81 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 18 Feb 2008 13:35:15 +0000 Subject: [PATCH 30/60] Add missing #include of socket_types.hpp needed for the SSL unit tests to compile successfully on Windows. [SVN r43303] --- include/boost/asio/ssl/detail/openssl_types.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/asio/ssl/detail/openssl_types.hpp b/include/boost/asio/ssl/detail/openssl_types.hpp index 2681cc16..8b895785 100644 --- a/include/boost/asio/ssl/detail/openssl_types.hpp +++ b/include/boost/asio/ssl/detail/openssl_types.hpp @@ -17,6 +17,8 @@ #include +#include + #include #include #include From 5b0909708231c25bfd7c96eb04d712801728b2f2 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Fri, 22 Feb 2008 22:43:54 +0000 Subject: [PATCH 31/60] Use the correct vector of timer queues when dispatching timers. [SVN r43377] --- include/boost/asio/detail/win_iocp_io_service.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/asio/detail/win_iocp_io_service.hpp b/include/boost/asio/detail/win_iocp_io_service.hpp index b9ab033b..b0e84498 100644 --- a/include/boost/asio/detail/win_iocp_io_service.hpp +++ b/include/boost/asio/detail/win_iocp_io_service.hpp @@ -421,11 +421,11 @@ private: { boost::asio::detail::mutex::scoped_lock lock(timer_mutex_); timer_queues_copy_ = timer_queues_; - for (std::size_t i = 0; i < timer_queues_.size(); ++i) + for (std::size_t i = 0; i < timer_queues_copy_.size(); ++i) { - timer_queues_[i]->dispatch_timers(); - timer_queues_[i]->dispatch_cancellations(); - timer_queues_[i]->cleanup_timers(); + timer_queues_copy_[i]->dispatch_timers(); + timer_queues_copy_[i]->dispatch_cancellations(); + timer_queues_copy_[i]->cleanup_timers(); } } catch (...) From 61bcc0b5ec17c04ec3a8d483722c65d328b30207 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Fri, 29 Feb 2008 12:57:57 +0000 Subject: [PATCH 32/60] Add missing tie(). [SVN r43437] --- include/boost/asio/basic_socket_iostream.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/asio/basic_socket_iostream.hpp b/include/boost/asio/basic_socket_iostream.hpp index 22fa151a..be1bac28 100644 --- a/include/boost/asio/basic_socket_iostream.hpp +++ b/include/boost/asio/basic_socket_iostream.hpp @@ -49,6 +49,7 @@ : std::basic_iostream(&this->boost::base_from_member< \ basic_socket_streambuf >::member) \ { \ + tie(this); \ if (rdbuf()->connect(BOOST_PP_ENUM_PARAMS(n, x)) == 0) \ this->setstate(std::ios_base::failbit); \ } \ @@ -89,6 +90,7 @@ public: : std::basic_iostream(&this->boost::base_from_member< basic_socket_streambuf >::member) { + tie(this); } #if defined(GENERATING_DOCUMENTATION) From 002ebea1e3eb6783651c6c737adf13d031cf06c7 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 3 Mar 2008 13:21:05 +0000 Subject: [PATCH 33/60] Disable use of CancelIo by default, due to the possibility of silent failure on some system configurations. Swallow error returned by CancelIoEx if there are no operations to be cancelled. [SVN r43469] --- doc/using.qbk | 31 ++++++++ include/boost/asio/basic_socket.hpp | 70 +++++++++++++++++++ .../asio/detail/win_iocp_socket_service.hpp | 42 ++++++++++- 3 files changed, 141 insertions(+), 2 deletions(-) diff --git a/doc/using.qbk b/doc/using.qbk index f58601b6..03f1e764 100644 --- a/doc/using.qbk +++ b/doc/using.qbk @@ -224,6 +224,37 @@ Boost.Asio. function. Defaults to 5. ] ] + [ + [`BOOST_ASIO_ENABLE_CANCELIO`] + [ + Enables use of the `CancelIo` function on older versions of Windows. If + not enabled, calls to `cancel()` on a socket object will always fail with + `asio::error::operation_not_supported` when run on Windows XP, Windows + Server 2003, and earlier versions of Windows. When running on Windows + Vista, Windows Server 2008, and later, the `CancelIoEx` function is + always used. + + The `CancelIo` function has two issues that should be considered before + enabling its use: + + * It will only cancel asynchronous operations that were initiated in the + current thread. + + * It can appear to complete without error, but the request + to cancel the unfinished operations may be silently ignored by the + operating system. Whether it works or not seems to depend on the + drivers that are installed. + + For portable cancellation, consider using one of the following + alternatives: + + * Disable asio's I/O completion port backend by defining + BOOST_ASIO_DISABLE_IOCP. + + * Use the socket object's close() function to simultaneously + cancel the outstanding operations and close the socket. + ] + ] ] [endsect] diff --git a/include/boost/asio/basic_socket.hpp b/include/boost/asio/basic_socket.hpp index ea57f78d..ab707606 100644 --- a/include/boost/asio/basic_socket.hpp +++ b/include/boost/asio/basic_socket.hpp @@ -17,6 +17,10 @@ #include +#include +#include +#include + #include #include #include @@ -296,7 +300,40 @@ public: * will be passed the boost::asio::error::operation_aborted error. * * @throws boost::system::system_error Thrown on failure. + * + * @note Calls to cancel() will always fail with + * boost::asio::error::operation_not_supported when run on Windows XP, Windows + * Server 2003, and earlier versions of Windows, unless + * BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has + * two issues that should be considered before enabling its use: + * + * @li It will only cancel asynchronous operations that were initiated in the + * current thread. + * + * @li It can appear to complete without error, but the request to cancel the + * unfinished operations may be silently ignored by the operating system. + * Whether it works or not seems to depend on the drivers that are installed. + * + * For portable cancellation, consider using one of the following + * alternatives: + * + * @li Disable asio's I/O completion port backend by defining + * BOOST_ASIO_DISABLE_IOCP. + * + * @li Use the close() function to simultaneously cancel the outstanding + * operations and close the socket. + * + * When running on Windows Vista, Windows Server 2008, and later, the + * CancelIoEx function is always used. This function does not have the + * problems described above. */ +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) \ + && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \ + && !defined(BOOST_ASIO_ENABLE_CANCELIO) + __declspec(deprecated("By default, this function always fails with " + "operation_not_supported when used on Windows XP, Windows Server 2003, " + "or earlier. Consult documentation for details.")) +#endif void cancel() { boost::system::error_code ec; @@ -311,7 +348,40 @@ public: * will be passed the boost::asio::error::operation_aborted error. * * @param ec Set to indicate what error occurred, if any. + * + * @note Calls to cancel() will always fail with + * boost::asio::error::operation_not_supported when run on Windows XP, Windows + * Server 2003, and earlier versions of Windows, unless + * BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has + * two issues that should be considered before enabling its use: + * + * @li It will only cancel asynchronous operations that were initiated in the + * current thread. + * + * @li It can appear to complete without error, but the request to cancel the + * unfinished operations may be silently ignored by the operating system. + * Whether it works or not seems to depend on the drivers that are installed. + * + * For portable cancellation, consider using one of the following + * alternatives: + * + * @li Disable asio's I/O completion port backend by defining + * BOOST_ASIO_DISABLE_IOCP. + * + * @li Use the close() function to simultaneously cancel the outstanding + * operations and close the socket. + * + * When running on Windows Vista, Windows Server 2008, and later, the + * CancelIoEx function is always used. This function does not have the + * problems described above. */ +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) \ + && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \ + && !defined(BOOST_ASIO_ENABLE_CANCELIO) + __declspec(deprecated("By default, this function always fails with " + "operation_not_supported when used on Windows XP, Windows Server 2003, " + "or earlier. Consult documentation for details.")) +#endif boost::system::error_code cancel(boost::system::error_code& ec) { return this->service.cancel(this->implementation, ec); diff --git a/include/boost/asio/detail/win_iocp_socket_service.hpp b/include/boost/asio/detail/win_iocp_socket_service.hpp index 96dc01aa..d7bdd608 100644 --- a/include/boost/asio/detail/win_iocp_socket_service.hpp +++ b/include/boost/asio/detail/win_iocp_socket_service.hpp @@ -156,11 +156,13 @@ public: // The protocol associated with the socket. protocol_type protocol_; +#if defined(BOOST_ASIO_ENABLE_CANCELIO) // The ID of the thread from which it is safe to cancel asynchronous // operations. 0 means no asynchronous operations have been started yet. // ~0 means asynchronous operations have been started from more than one // thread, and cancellation is not supported for the socket. DWORD safe_cancellation_thread_id_; +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Pointers to adjacent socket implementations in linked list. implementation_type* next_; @@ -204,7 +206,9 @@ public: impl.socket_ = invalid_socket; impl.flags_ = 0; impl.cancel_token_.reset(); +#if defined(BOOST_ASIO_ENABLE_CANCELIO) impl.safe_cancellation_thread_id_ = 0; +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Insert implementation into linked list of all implementations. boost::asio::detail::mutex::scoped_lock lock(mutex_); @@ -306,7 +310,9 @@ public: impl.socket_ = invalid_socket; impl.flags_ = 0; impl.cancel_token_.reset(); +#if defined(BOOST_ASIO_ENABLE_CANCELIO) impl.safe_cancellation_thread_id_ = 0; +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) } ec = boost::system::error_code(); @@ -338,14 +344,25 @@ public: if (!cancel_io_ex(sock_as_handle, 0)) { DWORD last_error = ::GetLastError(); - ec = boost::system::error_code(last_error, - boost::asio::error::get_system_category()); + if (last_error == ERROR_NOT_FOUND) + { + // ERROR_NOT_FOUND means that there were no operations to be + // cancelled. We swallow this error to match the behaviour on other + // platforms. + ec = boost::system::error_code(); + } + else + { + ec = boost::system::error_code(last_error, + boost::asio::error::get_system_category()); + } } else { ec = boost::system::error_code(); } } +#if defined(BOOST_ASIO_ENABLE_CANCELIO) else if (impl.safe_cancellation_thread_id_ == 0) { // No operations have been started, so there's nothing to cancel. @@ -374,6 +391,13 @@ public: // so cancellation is not safe. ec = boost::asio::error::operation_not_supported; } +#else // defined(BOOST_ASIO_ENABLE_CANCELIO) + else + { + // Cancellation is not supported as CancelIo may not be used. + ec = boost::asio::error::operation_not_supported; + } +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) return ec; } @@ -773,11 +797,13 @@ public: return; } +#if defined(BOOST_ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef send_operation value_type; @@ -964,11 +990,13 @@ public: return; } +#if defined(BOOST_ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef send_to_operation value_type; @@ -1175,11 +1203,13 @@ public: return; } +#if defined(BOOST_ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef receive_operation value_type; @@ -1395,11 +1425,13 @@ public: return; } +#if defined(BOOST_ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef receive_from_operation value_type; @@ -1719,11 +1751,13 @@ public: return; } +#if defined(BOOST_ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Create a new socket for the connection. boost::system::error_code ec; @@ -1893,11 +1927,13 @@ public: return; } +#if defined(BOOST_ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) // Check if the reactor was already obtained from the io_service. reactor_type* reactor = static_cast( @@ -1997,7 +2033,9 @@ private: impl.socket_ = invalid_socket; impl.flags_ = 0; impl.cancel_token_.reset(); +#if defined(BOOST_ASIO_ENABLE_CANCELIO) impl.safe_cancellation_thread_id_ = 0; +#endif // defined(BOOST_ASIO_ENABLE_CANCELIO) } } From 7df2a57eefbbd6a210ae790598376c272371edd8 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 3 Mar 2008 13:27:06 +0000 Subject: [PATCH 34/60] Add missing 'boost_' prefix to helper namespace. [SVN r43470] --- include/boost/asio/detail/bind_handler.hpp | 10 +++++----- include/boost/asio/detail/handler_invoke_helpers.hpp | 6 +++--- include/boost/asio/detail/handler_queue.hpp | 2 +- include/boost/asio/detail/strand_service.hpp | 4 ++-- include/boost/asio/detail/task_io_service.hpp | 2 +- include/boost/asio/detail/win_iocp_io_service.hpp | 4 ++-- include/boost/asio/detail/win_iocp_socket_service.hpp | 10 +++++----- include/boost/asio/detail/wrapped_handler.hpp | 2 +- include/boost/asio/impl/read.ipp | 4 ++-- include/boost/asio/impl/read_until.ipp | 6 +++--- include/boost/asio/impl/write.ipp | 4 ++-- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/boost/asio/detail/bind_handler.hpp b/include/boost/asio/detail/bind_handler.hpp index 25ab9e1b..fb5aab0f 100644 --- a/include/boost/asio/detail/bind_handler.hpp +++ b/include/boost/asio/detail/bind_handler.hpp @@ -69,7 +69,7 @@ template inline void asio_handler_invoke(const Function& function, binder1* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } @@ -127,7 +127,7 @@ template inline void asio_handler_invoke(const Function& function, binder2* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } @@ -189,7 +189,7 @@ template * this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } @@ -256,7 +256,7 @@ template * this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } @@ -328,7 +328,7 @@ template * this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } diff --git a/include/boost/asio/detail/handler_invoke_helpers.hpp b/include/boost/asio/detail/handler_invoke_helpers.hpp index cfcf8e98..ea02d3f3 100644 --- a/include/boost/asio/detail/handler_invoke_helpers.hpp +++ b/include/boost/asio/detail/handler_invoke_helpers.hpp @@ -24,9 +24,9 @@ #include // Calls to asio_handler_invoke must be made from a namespace that does not -// contain overloads of this function. The asio_handler_invoke_helpers +// contain overloads of this function. The boost_asio_handler_invoke_helpers // namespace is defined here for that purpose. -namespace asio_handler_invoke_helpers { +namespace boost_asio_handler_invoke_helpers { template inline void invoke(const Function& function, Context* context) @@ -40,7 +40,7 @@ inline void invoke(const Function& function, Context* context) #endif } -} // namespace asio_handler_invoke_helpers +} // namespace boost_asio_handler_invoke_helpers #include diff --git a/include/boost/asio/detail/handler_queue.hpp b/include/boost/asio/detail/handler_queue.hpp index a84bf5ad..ad1c695d 100644 --- a/include/boost/asio/detail/handler_queue.hpp +++ b/include/boost/asio/detail/handler_queue.hpp @@ -189,7 +189,7 @@ private: ptr.reset(); // Make the upcall. - asio_handler_invoke_helpers::invoke(handler, &handler); + boost_asio_handler_invoke_helpers::invoke(handler, &handler); } static void do_destroy(handler* base) diff --git a/include/boost/asio/detail/strand_service.hpp b/include/boost/asio/detail/strand_service.hpp index ed3d96fd..79a481fd 100644 --- a/include/boost/asio/detail/strand_service.hpp +++ b/include/boost/asio/detail/strand_service.hpp @@ -336,7 +336,7 @@ public: call_stack::context ctx(impl.get()); // Make the upcall. - asio_handler_invoke_helpers::invoke(handler, &handler); + boost_asio_handler_invoke_helpers::invoke(handler, &handler); } static void do_destroy(handler_base* base) @@ -413,7 +413,7 @@ public: { if (call_stack::contains(impl.get())) { - asio_handler_invoke_helpers::invoke(handler, &handler); + boost_asio_handler_invoke_helpers::invoke(handler, &handler); } else { diff --git a/include/boost/asio/detail/task_io_service.hpp b/include/boost/asio/detail/task_io_service.hpp index 6da9e0dc..7175c8ef 100644 --- a/include/boost/asio/detail/task_io_service.hpp +++ b/include/boost/asio/detail/task_io_service.hpp @@ -162,7 +162,7 @@ public: void dispatch(Handler handler) { if (call_stack::contains(this)) - asio_handler_invoke_helpers::invoke(handler, &handler); + boost_asio_handler_invoke_helpers::invoke(handler, &handler); else post(handler); } diff --git a/include/boost/asio/detail/win_iocp_io_service.hpp b/include/boost/asio/detail/win_iocp_io_service.hpp index b0e84498..83d3c114 100644 --- a/include/boost/asio/detail/win_iocp_io_service.hpp +++ b/include/boost/asio/detail/win_iocp_io_service.hpp @@ -260,7 +260,7 @@ public: void dispatch(Handler handler) { if (call_stack::contains(this)) - asio_handler_invoke_helpers::invoke(handler, &handler); + boost_asio_handler_invoke_helpers::invoke(handler, &handler); else post(handler); } @@ -627,7 +627,7 @@ private: ptr.reset(); // Make the upcall. - asio_handler_invoke_helpers::invoke(handler, &handler); + boost_asio_handler_invoke_helpers::invoke(handler, &handler); } static void destroy_impl(operation* op) diff --git a/include/boost/asio/detail/win_iocp_socket_service.hpp b/include/boost/asio/detail/win_iocp_socket_service.hpp index d7bdd608..a6ec9041 100644 --- a/include/boost/asio/detail/win_iocp_socket_service.hpp +++ b/include/boost/asio/detail/win_iocp_socket_service.hpp @@ -765,7 +765,7 @@ public: ptr.reset(); // Call the handler. - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( detail::bind_handler(handler, ec, bytes_transferred), &handler); } @@ -958,7 +958,7 @@ public: ptr.reset(); // Call the handler. - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( detail::bind_handler(handler, ec, bytes_transferred), &handler); } @@ -1170,7 +1170,7 @@ public: ptr.reset(); // Call the handler. - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( detail::bind_handler(handler, ec, bytes_transferred), &handler); } @@ -1390,7 +1390,7 @@ public: ptr.reset(); // Call the handler. - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( detail::bind_handler(handler, ec, bytes_transferred), &handler); } @@ -1704,7 +1704,7 @@ public: // Call the handler. boost::system::error_code ec(last_error, boost::asio::error::get_system_category()); - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( detail::bind_handler(handler, ec), &handler); } diff --git a/include/boost/asio/detail/wrapped_handler.hpp b/include/boost/asio/detail/wrapped_handler.hpp index 99271b4f..ecd24839 100644 --- a/include/boost/asio/detail/wrapped_handler.hpp +++ b/include/boost/asio/detail/wrapped_handler.hpp @@ -182,7 +182,7 @@ template inline void asio_handler_invoke(const Function& function, rewrapped_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->context_); } diff --git a/include/boost/asio/impl/read.ipp b/include/boost/asio/impl/read.ipp index 6134b9c8..a8c1bb46 100644 --- a/include/boost/asio/impl/read.ipp +++ b/include/boost/asio/impl/read.ipp @@ -186,7 +186,7 @@ namespace detail read_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } } // namespace detail @@ -282,7 +282,7 @@ namespace detail read_streambuf_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } } // namespace detail diff --git a/include/boost/asio/impl/read_until.ipp b/include/boost/asio/impl/read_until.ipp index 821b80e8..dcca7b63 100644 --- a/include/boost/asio/impl/read_until.ipp +++ b/include/boost/asio/impl/read_until.ipp @@ -358,7 +358,7 @@ namespace detail read_until_delim_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } } // namespace detail @@ -515,7 +515,7 @@ namespace detail read_until_delim_string_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } } // namespace detail @@ -689,7 +689,7 @@ namespace detail read_until_expr_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } } // namespace detail diff --git a/include/boost/asio/impl/write.ipp b/include/boost/asio/impl/write.ipp index 8073bfdd..5df05d56 100644 --- a/include/boost/asio/impl/write.ipp +++ b/include/boost/asio/impl/write.ipp @@ -172,7 +172,7 @@ namespace detail write_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } } // namespace detail @@ -250,7 +250,7 @@ namespace detail write_streambuf_handler* this_handler) { - asio_handler_invoke_helpers::invoke( + boost_asio_handler_invoke_helpers::invoke( function, &this_handler->handler_); } } // namespace detail From d7bc0d3c9f51ca93fbc037ff7c614d3a857162b3 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 3 Mar 2008 13:36:35 +0000 Subject: [PATCH 35/60] Regenerate documentation. [SVN r43471] --- doc/reference.qbk | 149 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 141 insertions(+), 8 deletions(-) diff --git a/doc/reference.qbk b/doc/reference.qbk index ed5a0542..25d01f09 100644 --- a/doc/reference.qbk +++ b/doc/reference.qbk @@ -2647,10 +2647,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[boost::system::system_error][Thrown on failure. ]] +[[boost::system::system_error][Thrown on failure.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -2676,10 +2692,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[ec][Set to indicate what error occurred, if any. ]] +[[ec][Set to indicate what error occurred, if any.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -7239,10 +7271,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[boost::system::system_error][Thrown on failure. ]] +[[boost::system::system_error][Thrown on failure.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -7265,10 +7313,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[ec][Set to indicate what error occurred, if any. ]] +[[ec][Set to indicate what error occurred, if any.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -12647,10 +12711,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[boost::system::system_error][Thrown on failure. ]] +[[boost::system::system_error][Thrown on failure.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -12676,10 +12756,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[ec][Set to indicate what error occurred, if any. ]] +[[ec][Set to indicate what error occurred, if any.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -16114,10 +16210,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[boost::system::system_error][Thrown on failure. ]] +[[boost::system::system_error][Thrown on failure.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -16143,10 +16255,26 @@ This function causes all outstanding asynchronous connect, send and receive oper [variablelist -[[ec][Set to indicate what error occurred, if any. ]] +[[ec][Set to indicate what error occurred, if any.]] ] +[heading Remarks] + +Calls to cancel() will always fail with boost::asio::error::operation\_not\_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST\_ASIO\_ENABLE\_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use: + +* It will only cancel asynchronous operations that were initiated in the current thread. + +* It can appear to complete without error, but the request to cancel the unfinished operations may be silently ignored by the operating system. Whether it works or not seems to depend on the drivers that are installed. + +For portable cancellation, consider using one of the following alternatives: + + +* Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP. + +* Use the close() function to simultaneously cancel the outstanding operations and close the socket. + +When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx function is always used. This function does not have the problems described above. [endsect] @@ -22950,6 +23078,11 @@ The time traits type. [Operation already in progress. ] ] + [ + [broken_pipe] + [Broken pipe. ] + ] + [ [connection_aborted] [A connection has been aborted. ] From f99a3cb8142dffd3be1879548638762209a4368c Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Mon, 3 Mar 2008 14:05:35 +0000 Subject: [PATCH 36/60] Update copyright notices. [SVN r43472] --- example/allocation/server.cpp | 2 +- example/buffers/reference_counted.cpp | 2 +- example/chat/chat_client.cpp | 2 +- example/chat/chat_message.hpp | 2 +- example/chat/chat_server.cpp | 2 +- example/echo/async_tcp_echo_server.cpp | 2 +- example/echo/async_udp_echo_server.cpp | 2 +- example/echo/blocking_tcp_echo_client.cpp | 2 +- example/echo/blocking_tcp_echo_server.cpp | 2 +- example/echo/blocking_udp_echo_client.cpp | 2 +- example/echo/blocking_udp_echo_server.cpp | 2 +- example/http/client/async_client.cpp | 2 +- example/http/client/sync_client.cpp | 2 +- example/http/doc_root/data_1K.html | 2 +- example/http/doc_root/data_2K.html | 2 +- example/http/doc_root/data_4K.html | 2 +- example/http/doc_root/data_8K.html | 2 +- example/http/server/connection.cpp | 2 +- example/http/server/connection.hpp | 2 +- example/http/server/connection_manager.cpp | 2 +- example/http/server/connection_manager.hpp | 2 +- example/http/server/header.hpp | 2 +- example/http/server/mime_types.cpp | 2 +- example/http/server/mime_types.hpp | 2 +- example/http/server/posix_main.cpp | 2 +- example/http/server/reply.cpp | 2 +- example/http/server/reply.hpp | 2 +- example/http/server/request.hpp | 2 +- example/http/server/request_handler.cpp | 2 +- example/http/server/request_handler.hpp | 2 +- example/http/server/request_parser.cpp | 2 +- example/http/server/request_parser.hpp | 2 +- example/http/server/server.cpp | 2 +- example/http/server/server.hpp | 2 +- example/http/server/win_main.cpp | 2 +- example/http/server2/connection.cpp | 2 +- example/http/server2/connection.hpp | 2 +- example/http/server2/header.hpp | 2 +- example/http/server2/io_service_pool.cpp | 2 +- example/http/server2/io_service_pool.hpp | 2 +- example/http/server2/mime_types.cpp | 2 +- example/http/server2/mime_types.hpp | 2 +- example/http/server2/posix_main.cpp | 2 +- example/http/server2/reply.cpp | 2 +- example/http/server2/reply.hpp | 2 +- example/http/server2/request.hpp | 2 +- example/http/server2/request_handler.cpp | 2 +- example/http/server2/request_handler.hpp | 2 +- example/http/server2/request_parser.cpp | 2 +- example/http/server2/request_parser.hpp | 2 +- example/http/server2/server.cpp | 2 +- example/http/server2/server.hpp | 2 +- example/http/server2/win_main.cpp | 2 +- example/http/server3/connection.cpp | 2 +- example/http/server3/connection.hpp | 2 +- example/http/server3/header.hpp | 2 +- example/http/server3/mime_types.cpp | 2 +- example/http/server3/mime_types.hpp | 2 +- example/http/server3/posix_main.cpp | 2 +- example/http/server3/reply.cpp | 2 +- example/http/server3/reply.hpp | 2 +- example/http/server3/request.hpp | 2 +- example/http/server3/request_handler.cpp | 2 +- example/http/server3/request_handler.hpp | 2 +- example/http/server3/request_parser.cpp | 2 +- example/http/server3/request_parser.hpp | 2 +- example/http/server3/server.cpp | 2 +- example/http/server3/server.hpp | 2 +- example/http/server3/win_main.cpp | 2 +- example/invocation/prioritised_handlers.cpp | 2 +- example/iostreams/daytime_client.cpp | 2 +- example/iostreams/daytime_server.cpp | 2 +- example/multicast/receiver.cpp | 2 +- example/multicast/sender.cpp | 2 +- example/serialization/client.cpp | 2 +- example/serialization/connection.hpp | 2 +- example/serialization/server.cpp | 2 +- example/serialization/stock.hpp | 2 +- example/services/basic_logger.hpp | 2 +- example/services/daytime_client.cpp | 2 +- example/services/logger.hpp | 2 +- example/services/logger_service.cpp | 2 +- example/services/logger_service.hpp | 2 +- example/services/stream_socket_service.hpp | 2 +- example/socks4/socks4.hpp | 2 +- example/socks4/sync_client.cpp | 2 +- example/ssl/README | 2 +- example/ssl/client.cpp | 2 +- example/ssl/server.cpp | 2 +- example/timeouts/accept_timeout.cpp | 2 +- example/timeouts/connect_timeout.cpp | 2 +- example/timeouts/datagram_receive_timeout.cpp | 2 +- example/timeouts/stream_receive_timeout.cpp | 2 +- example/timers/tick_count_timer.cpp | 2 +- example/timers/time_t_timer.cpp | 2 +- example/tutorial/daytime1/client.cpp | 2 +- example/tutorial/daytime2/server.cpp | 2 +- example/tutorial/daytime3/server.cpp | 2 +- example/tutorial/daytime4/client.cpp | 2 +- example/tutorial/daytime5/server.cpp | 2 +- example/tutorial/daytime6/server.cpp | 2 +- example/tutorial/daytime7/server.cpp | 2 +- example/tutorial/daytime_dox.txt | 2 +- example/tutorial/index_dox.txt | 2 +- example/tutorial/timer1/timer.cpp | 2 +- example/tutorial/timer2/timer.cpp | 2 +- example/tutorial/timer3/timer.cpp | 2 +- example/tutorial/timer4/timer.cpp | 2 +- example/tutorial/timer5/timer.cpp | 2 +- example/tutorial/timer_dox.txt | 2 +- include/boost/asio.hpp | 2 +- include/boost/asio/basic_datagram_socket.hpp | 2 +- include/boost/asio/basic_deadline_timer.hpp | 2 +- include/boost/asio/basic_io_object.hpp | 2 +- include/boost/asio/basic_socket.hpp | 2 +- include/boost/asio/basic_socket_acceptor.hpp | 2 +- include/boost/asio/basic_socket_iostream.hpp | 2 +- include/boost/asio/basic_socket_streambuf.hpp | 2 +- include/boost/asio/basic_stream_socket.hpp | 2 +- include/boost/asio/basic_streambuf.hpp | 2 +- include/boost/asio/buffer.hpp | 2 +- include/boost/asio/buffered_read_stream.hpp | 2 +- include/boost/asio/buffered_read_stream_fwd.hpp | 2 +- include/boost/asio/buffered_stream.hpp | 2 +- include/boost/asio/buffered_stream_fwd.hpp | 2 +- include/boost/asio/buffered_write_stream.hpp | 2 +- include/boost/asio/buffered_write_stream_fwd.hpp | 2 +- include/boost/asio/completion_condition.hpp | 2 +- include/boost/asio/datagram_socket_service.hpp | 2 +- include/boost/asio/deadline_timer.hpp | 2 +- include/boost/asio/deadline_timer_service.hpp | 2 +- include/boost/asio/detail/bind_handler.hpp | 2 +- include/boost/asio/detail/buffer_resize_guard.hpp | 2 +- include/boost/asio/detail/buffered_stream_storage.hpp | 2 +- include/boost/asio/detail/call_stack.hpp | 2 +- include/boost/asio/detail/const_buffers_iterator.hpp | 2 +- include/boost/asio/detail/consuming_buffers.hpp | 2 +- include/boost/asio/detail/deadline_timer_service.hpp | 2 +- include/boost/asio/detail/dev_poll_reactor.hpp | 2 +- include/boost/asio/detail/dev_poll_reactor_fwd.hpp | 2 +- include/boost/asio/detail/epoll_reactor.hpp | 2 +- include/boost/asio/detail/epoll_reactor_fwd.hpp | 2 +- include/boost/asio/detail/event.hpp | 2 +- include/boost/asio/detail/fd_set_adapter.hpp | 2 +- include/boost/asio/detail/handler_alloc_helpers.hpp | 2 +- include/boost/asio/detail/handler_invoke_helpers.hpp | 2 +- include/boost/asio/detail/handler_queue.hpp | 2 +- include/boost/asio/detail/hash_map.hpp | 2 +- include/boost/asio/detail/io_control.hpp | 2 +- include/boost/asio/detail/kqueue_reactor.hpp | 2 +- include/boost/asio/detail/kqueue_reactor_fwd.hpp | 2 +- include/boost/asio/detail/local_free_on_block_exit.hpp | 2 +- include/boost/asio/detail/mutex.hpp | 2 +- include/boost/asio/detail/noncopyable.hpp | 2 +- include/boost/asio/detail/null_event.hpp | 2 +- include/boost/asio/detail/null_mutex.hpp | 2 +- include/boost/asio/detail/null_signal_blocker.hpp | 2 +- include/boost/asio/detail/null_thread.hpp | 2 +- include/boost/asio/detail/null_tss_ptr.hpp | 2 +- include/boost/asio/detail/old_win_sdk_compat.hpp | 2 +- include/boost/asio/detail/pipe_select_interrupter.hpp | 2 +- include/boost/asio/detail/pop_options.hpp | 2 +- include/boost/asio/detail/posix_event.hpp | 2 +- include/boost/asio/detail/posix_fd_set_adapter.hpp | 2 +- include/boost/asio/detail/posix_mutex.hpp | 2 +- include/boost/asio/detail/posix_signal_blocker.hpp | 2 +- include/boost/asio/detail/posix_thread.hpp | 2 +- include/boost/asio/detail/posix_tss_ptr.hpp | 2 +- include/boost/asio/detail/push_options.hpp | 2 +- include/boost/asio/detail/reactive_socket_service.hpp | 2 +- include/boost/asio/detail/reactor_op_queue.hpp | 2 +- include/boost/asio/detail/resolver_service.hpp | 2 +- include/boost/asio/detail/scoped_lock.hpp | 2 +- include/boost/asio/detail/select_interrupter.hpp | 2 +- include/boost/asio/detail/select_reactor.hpp | 2 +- include/boost/asio/detail/select_reactor_fwd.hpp | 2 +- include/boost/asio/detail/service_base.hpp | 2 +- include/boost/asio/detail/service_id.hpp | 2 +- include/boost/asio/detail/service_registry.hpp | 2 +- include/boost/asio/detail/service_registry_fwd.hpp | 2 +- include/boost/asio/detail/signal_blocker.hpp | 2 +- include/boost/asio/detail/signal_init.hpp | 2 +- include/boost/asio/detail/socket_holder.hpp | 2 +- include/boost/asio/detail/socket_ops.hpp | 2 +- include/boost/asio/detail/socket_option.hpp | 2 +- include/boost/asio/detail/socket_select_interrupter.hpp | 2 +- include/boost/asio/detail/socket_types.hpp | 2 +- include/boost/asio/detail/strand_service.hpp | 2 +- include/boost/asio/detail/task_io_service.hpp | 2 +- include/boost/asio/detail/task_io_service_fwd.hpp | 2 +- include/boost/asio/detail/thread.hpp | 2 +- include/boost/asio/detail/throw_error.hpp | 2 +- include/boost/asio/detail/timer_queue.hpp | 2 +- include/boost/asio/detail/timer_queue_base.hpp | 2 +- include/boost/asio/detail/tss_ptr.hpp | 2 +- include/boost/asio/detail/win_event.hpp | 2 +- include/boost/asio/detail/win_fd_set_adapter.hpp | 2 +- include/boost/asio/detail/win_iocp_io_service.hpp | 2 +- include/boost/asio/detail/win_iocp_io_service_fwd.hpp | 2 +- include/boost/asio/detail/win_iocp_socket_service.hpp | 2 +- include/boost/asio/detail/win_mutex.hpp | 2 +- include/boost/asio/detail/win_signal_blocker.hpp | 2 +- include/boost/asio/detail/win_thread.hpp | 2 +- include/boost/asio/detail/win_tss_ptr.hpp | 2 +- include/boost/asio/detail/wince_thread.hpp | 2 +- include/boost/asio/detail/winsock_init.hpp | 2 +- include/boost/asio/detail/wrapped_handler.hpp | 2 +- include/boost/asio/error.hpp | 2 +- include/boost/asio/handler_alloc_hook.hpp | 2 +- include/boost/asio/handler_invoke_hook.hpp | 2 +- include/boost/asio/impl/io_service.ipp | 2 +- include/boost/asio/impl/read.ipp | 2 +- include/boost/asio/impl/read_until.ipp | 2 +- include/boost/asio/impl/write.ipp | 2 +- include/boost/asio/io_service.hpp | 2 +- include/boost/asio/ip/address.hpp | 2 +- include/boost/asio/ip/address_v4.hpp | 2 +- include/boost/asio/ip/address_v6.hpp | 2 +- include/boost/asio/ip/basic_endpoint.hpp | 2 +- include/boost/asio/ip/basic_resolver.hpp | 2 +- include/boost/asio/ip/basic_resolver_entry.hpp | 2 +- include/boost/asio/ip/basic_resolver_iterator.hpp | 2 +- include/boost/asio/ip/basic_resolver_query.hpp | 2 +- include/boost/asio/ip/detail/socket_option.hpp | 2 +- include/boost/asio/ip/host_name.hpp | 2 +- include/boost/asio/ip/multicast.hpp | 2 +- include/boost/asio/ip/resolver_query_base.hpp | 2 +- include/boost/asio/ip/resolver_service.hpp | 2 +- include/boost/asio/ip/tcp.hpp | 2 +- include/boost/asio/ip/udp.hpp | 2 +- include/boost/asio/ip/unicast.hpp | 2 +- include/boost/asio/ip/v6_only.hpp | 2 +- include/boost/asio/is_read_buffered.hpp | 2 +- include/boost/asio/is_write_buffered.hpp | 2 +- include/boost/asio/placeholders.hpp | 2 +- include/boost/asio/read.hpp | 2 +- include/boost/asio/read_until.hpp | 2 +- include/boost/asio/socket_acceptor_service.hpp | 2 +- include/boost/asio/socket_base.hpp | 2 +- include/boost/asio/ssl.hpp | 2 +- include/boost/asio/ssl/basic_context.hpp | 2 +- include/boost/asio/ssl/context.hpp | 2 +- include/boost/asio/ssl/context_base.hpp | 2 +- include/boost/asio/ssl/context_service.hpp | 2 +- include/boost/asio/ssl/detail/openssl_context_service.hpp | 2 +- include/boost/asio/ssl/detail/openssl_init.hpp | 2 +- include/boost/asio/ssl/detail/openssl_stream_service.hpp | 2 +- include/boost/asio/ssl/detail/openssl_types.hpp | 2 +- include/boost/asio/ssl/stream.hpp | 2 +- include/boost/asio/ssl/stream_base.hpp | 2 +- include/boost/asio/ssl/stream_service.hpp | 2 +- include/boost/asio/strand.hpp | 2 +- include/boost/asio/stream_socket_service.hpp | 2 +- include/boost/asio/streambuf.hpp | 2 +- include/boost/asio/time_traits.hpp | 2 +- include/boost/asio/version.hpp | 2 +- include/boost/asio/write.hpp | 2 +- test/basic_datagram_socket.cpp | 2 +- test/basic_deadline_timer.cpp | 2 +- test/basic_socket_acceptor.cpp | 2 +- test/basic_stream_socket.cpp | 2 +- test/buffer.cpp | 2 +- test/buffered_read_stream.cpp | 2 +- test/buffered_stream.cpp | 2 +- test/buffered_write_stream.cpp | 2 +- test/completion_condition.cpp | 2 +- test/datagram_socket_service.cpp | 2 +- test/deadline_timer.cpp | 2 +- test/deadline_timer_service.cpp | 2 +- test/error.cpp | 2 +- test/io_service.cpp | 2 +- test/ip/address.cpp | 2 +- test/ip/address_v4.cpp | 2 +- test/ip/address_v6.cpp | 2 +- test/ip/basic_endpoint.cpp | 2 +- test/ip/basic_resolver.cpp | 2 +- test/ip/basic_resolver_entry.cpp | 2 +- test/ip/basic_resolver_iterator.cpp | 2 +- test/ip/basic_resolver_query.cpp | 2 +- test/ip/host_name.cpp | 2 +- test/ip/multicast.cpp | 2 +- test/ip/resolver_query_base.cpp | 2 +- test/ip/resolver_service.cpp | 2 +- test/ip/tcp.cpp | 2 +- test/ip/udp.cpp | 2 +- test/ip/unicast.cpp | 2 +- test/ip/v6_only.cpp | 2 +- test/is_read_buffered.cpp | 2 +- test/is_write_buffered.cpp | 2 +- test/placeholders.cpp | 2 +- test/read.cpp | 2 +- test/read_until.cpp | 2 +- test/socket_acceptor_service.cpp | 2 +- test/socket_base.cpp | 2 +- test/ssl/basic_context.cpp | 2 +- test/ssl/context.cpp | 2 +- test/ssl/context_base.cpp | 2 +- test/ssl/context_service.cpp | 2 +- test/ssl/stream.cpp | 2 +- test/ssl/stream_base.cpp | 2 +- test/ssl/stream_service.cpp | 2 +- test/strand.cpp | 2 +- test/stream_socket_service.cpp | 2 +- test/time_traits.cpp | 2 +- test/unit_test.hpp | 2 +- test/write.cpp | 2 +- 306 files changed, 306 insertions(+), 306 deletions(-) diff --git a/example/allocation/server.cpp b/example/allocation/server.cpp index 02cae7c8..a934bf2e 100644 --- a/example/allocation/server.cpp +++ b/example/allocation/server.cpp @@ -2,7 +2,7 @@ // server.cpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/buffers/reference_counted.cpp b/example/buffers/reference_counted.cpp index a8dfbbbe..b89f74ca 100644 --- a/example/buffers/reference_counted.cpp +++ b/example/buffers/reference_counted.cpp @@ -2,7 +2,7 @@ // reference_counted.cpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/chat/chat_client.cpp b/example/chat/chat_client.cpp index 8cb64ff6..61ee5966 100644 --- a/example/chat/chat_client.cpp +++ b/example/chat/chat_client.cpp @@ -2,7 +2,7 @@ // chat_client.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/chat/chat_message.hpp b/example/chat/chat_message.hpp index 7d6cf41d..f791a09e 100644 --- a/example/chat/chat_message.hpp +++ b/example/chat/chat_message.hpp @@ -2,7 +2,7 @@ // chat_message.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/chat/chat_server.cpp b/example/chat/chat_server.cpp index bdad4865..f54e2fc5 100644 --- a/example/chat/chat_server.cpp +++ b/example/chat/chat_server.cpp @@ -2,7 +2,7 @@ // chat_server.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/echo/async_tcp_echo_server.cpp b/example/echo/async_tcp_echo_server.cpp index 142c58f2..37eb12ad 100644 --- a/example/echo/async_tcp_echo_server.cpp +++ b/example/echo/async_tcp_echo_server.cpp @@ -2,7 +2,7 @@ // async_tcp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/echo/async_udp_echo_server.cpp b/example/echo/async_udp_echo_server.cpp index e8ed4bbe..61ad6353 100644 --- a/example/echo/async_udp_echo_server.cpp +++ b/example/echo/async_udp_echo_server.cpp @@ -2,7 +2,7 @@ // async_udp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/echo/blocking_tcp_echo_client.cpp b/example/echo/blocking_tcp_echo_client.cpp index d2ae6e43..c44b2921 100644 --- a/example/echo/blocking_tcp_echo_client.cpp +++ b/example/echo/blocking_tcp_echo_client.cpp @@ -2,7 +2,7 @@ // blocking_tcp_echo_client.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/echo/blocking_tcp_echo_server.cpp b/example/echo/blocking_tcp_echo_server.cpp index 23e08ac5..bfabcdf2 100644 --- a/example/echo/blocking_tcp_echo_server.cpp +++ b/example/echo/blocking_tcp_echo_server.cpp @@ -2,7 +2,7 @@ // blocking_tcp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/echo/blocking_udp_echo_client.cpp b/example/echo/blocking_udp_echo_client.cpp index f3a79a19..eaa699de 100644 --- a/example/echo/blocking_udp_echo_client.cpp +++ b/example/echo/blocking_udp_echo_client.cpp @@ -2,7 +2,7 @@ // blocking_udp_echo_client.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/echo/blocking_udp_echo_server.cpp b/example/echo/blocking_udp_echo_server.cpp index f9d0ed3e..6bd5f864 100644 --- a/example/echo/blocking_udp_echo_server.cpp +++ b/example/echo/blocking_udp_echo_server.cpp @@ -2,7 +2,7 @@ // blocking_udp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/http/client/async_client.cpp b/example/http/client/async_client.cpp index 7d91fad4..3423d0b5 100644 --- a/example/http/client/async_client.cpp +++ b/example/http/client/async_client.cpp @@ -2,7 +2,7 @@ // async_client.cpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/http/client/sync_client.cpp b/example/http/client/sync_client.cpp index 8370a7df..65c9dfc5 100644 --- a/example/http/client/sync_client.cpp +++ b/example/http/client/sync_client.cpp @@ -2,7 +2,7 @@ // sync_client.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/example/http/doc_root/data_1K.html b/example/http/doc_root/data_1K.html index 4f0ae8f7..40ca46f4 100644 --- a/example/http/doc_root/data_1K.html +++ b/example/http/doc_root/data_1K.html @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements.qbk b/doc/requirements.qbk index 09be1a71..89437668 100644 --- a/doc/requirements.qbk +++ b/doc/requirements.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/AcceptHandler.qbk b/doc/requirements/AcceptHandler.qbk index d8e306db..e1eb1d0b 100644 --- a/doc/requirements/AcceptHandler.qbk +++ b/doc/requirements/AcceptHandler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/AsyncReadStream.qbk b/doc/requirements/AsyncReadStream.qbk index 20a745dd..3d07c76f 100644 --- a/doc/requirements/AsyncReadStream.qbk +++ b/doc/requirements/AsyncReadStream.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/AsyncWriteStream.qbk b/doc/requirements/AsyncWriteStream.qbk index b4b855ec..39a5dbef 100644 --- a/doc/requirements/AsyncWriteStream.qbk +++ b/doc/requirements/AsyncWriteStream.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/CompletionHandler.qbk b/doc/requirements/CompletionHandler.qbk index 20c2be22..5f67022e 100644 --- a/doc/requirements/CompletionHandler.qbk +++ b/doc/requirements/CompletionHandler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/ConnectHandler.qbk b/doc/requirements/ConnectHandler.qbk index 34c1ed84..88cde925 100644 --- a/doc/requirements/ConnectHandler.qbk +++ b/doc/requirements/ConnectHandler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/ConstBufferSequence.qbk b/doc/requirements/ConstBufferSequence.qbk index d576049b..57035424 100644 --- a/doc/requirements/ConstBufferSequence.qbk +++ b/doc/requirements/ConstBufferSequence.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/ConvertibleToConstBuffer.qbk b/doc/requirements/ConvertibleToConstBuffer.qbk index e5d9926d..f0216330 100644 --- a/doc/requirements/ConvertibleToConstBuffer.qbk +++ b/doc/requirements/ConvertibleToConstBuffer.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/ConvertibleToMutableBuffer.qbk b/doc/requirements/ConvertibleToMutableBuffer.qbk index 66e106cb..8b6c05f5 100644 --- a/doc/requirements/ConvertibleToMutableBuffer.qbk +++ b/doc/requirements/ConvertibleToMutableBuffer.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/DatagramSocketService.qbk b/doc/requirements/DatagramSocketService.qbk index 6059c358..76557916 100644 --- a/doc/requirements/DatagramSocketService.qbk +++ b/doc/requirements/DatagramSocketService.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/Endpoint.qbk b/doc/requirements/Endpoint.qbk index 94fecec9..38618e4f 100644 --- a/doc/requirements/Endpoint.qbk +++ b/doc/requirements/Endpoint.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/GettableSocketOption.qbk b/doc/requirements/GettableSocketOption.qbk index 5edaad40..c5da92b7 100644 --- a/doc/requirements/GettableSocketOption.qbk +++ b/doc/requirements/GettableSocketOption.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/Handler.qbk b/doc/requirements/Handler.qbk index f4ebdd6a..a28e5a7d 100644 --- a/doc/requirements/Handler.qbk +++ b/doc/requirements/Handler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/InternetProtocol.qbk b/doc/requirements/InternetProtocol.qbk index 84a73b1f..d1ddb841 100644 --- a/doc/requirements/InternetProtocol.qbk +++ b/doc/requirements/InternetProtocol.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/IoControlCommand.qbk b/doc/requirements/IoControlCommand.qbk index 763b1a8d..c27950b8 100644 --- a/doc/requirements/IoControlCommand.qbk +++ b/doc/requirements/IoControlCommand.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/IoObjectService.qbk b/doc/requirements/IoObjectService.qbk index 3302a35f..72aa7d0a 100644 --- a/doc/requirements/IoObjectService.qbk +++ b/doc/requirements/IoObjectService.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/MutableBufferSequence.qbk b/doc/requirements/MutableBufferSequence.qbk index 81c6cc66..54cf8b5e 100644 --- a/doc/requirements/MutableBufferSequence.qbk +++ b/doc/requirements/MutableBufferSequence.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/Protocol.qbk b/doc/requirements/Protocol.qbk index 2c1293db..cd99ce11 100644 --- a/doc/requirements/Protocol.qbk +++ b/doc/requirements/Protocol.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/ReadHandler.qbk b/doc/requirements/ReadHandler.qbk index 6c1a009b..473ad165 100644 --- a/doc/requirements/ReadHandler.qbk +++ b/doc/requirements/ReadHandler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/ResolveHandler.qbk b/doc/requirements/ResolveHandler.qbk index aa6a3c9b..7171275b 100644 --- a/doc/requirements/ResolveHandler.qbk +++ b/doc/requirements/ResolveHandler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/ResolverService.qbk b/doc/requirements/ResolverService.qbk index b0c31381..30e9eff1 100644 --- a/doc/requirements/ResolverService.qbk +++ b/doc/requirements/ResolverService.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/Service.qbk b/doc/requirements/Service.qbk index 08af711d..d8a62729 100644 --- a/doc/requirements/Service.qbk +++ b/doc/requirements/Service.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/SettableSocketOption.qbk b/doc/requirements/SettableSocketOption.qbk index 42366563..b19e01d2 100644 --- a/doc/requirements/SettableSocketOption.qbk +++ b/doc/requirements/SettableSocketOption.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/SocketAcceptorService.qbk b/doc/requirements/SocketAcceptorService.qbk index 75f396eb..404cc2f9 100644 --- a/doc/requirements/SocketAcceptorService.qbk +++ b/doc/requirements/SocketAcceptorService.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/SocketService.qbk b/doc/requirements/SocketService.qbk index 79082da1..7e0e14b7 100644 --- a/doc/requirements/SocketService.qbk +++ b/doc/requirements/SocketService.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/StreamSocketService.qbk b/doc/requirements/StreamSocketService.qbk index 11029d51..72723cb2 100644 --- a/doc/requirements/StreamSocketService.qbk +++ b/doc/requirements/StreamSocketService.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/SyncReadStream.qbk b/doc/requirements/SyncReadStream.qbk index 44ce9ea3..11f97b85 100644 --- a/doc/requirements/SyncReadStream.qbk +++ b/doc/requirements/SyncReadStream.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/SyncWriteStream.qbk b/doc/requirements/SyncWriteStream.qbk index 4cff9278..8285848a 100644 --- a/doc/requirements/SyncWriteStream.qbk +++ b/doc/requirements/SyncWriteStream.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/TimeTraits.qbk b/doc/requirements/TimeTraits.qbk index ec5d89d9..947b9c33 100644 --- a/doc/requirements/TimeTraits.qbk +++ b/doc/requirements/TimeTraits.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/TimerService.qbk b/doc/requirements/TimerService.qbk index b861aaa2..f66480bf 100644 --- a/doc/requirements/TimerService.qbk +++ b/doc/requirements/TimerService.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/WaitHandler.qbk b/doc/requirements/WaitHandler.qbk index fdce3010..9506786d 100644 --- a/doc/requirements/WaitHandler.qbk +++ b/doc/requirements/WaitHandler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/WriteHandler.qbk b/doc/requirements/WriteHandler.qbk index 6d21a48d..91e5e7a5 100644 --- a/doc/requirements/WriteHandler.qbk +++ b/doc/requirements/WriteHandler.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/requirements/asynchronous_operations.qbk b/doc/requirements/asynchronous_operations.qbk index ab73cb92..5e630e20 100644 --- a/doc/requirements/asynchronous_operations.qbk +++ b/doc/requirements/asynchronous_operations.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/tutorial.qbk b/doc/tutorial.qbk index 87c420a0..bf44c894 100644 --- a/doc/tutorial.qbk +++ b/doc/tutorial.qbk @@ -1,5 +1,5 @@ [/ - / Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + / Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) / / Distributed under the Boost Software License, Version 1.0. (See accompanying / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -141,7 +141,7 @@ Next: [link boost_asio.tutorial.tuttimer2 Timer.2 - Using a timer asynchronously ``''''''``// timer.cpp ``''''''``// ~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -241,7 +241,7 @@ Next: [link boost_asio.tutorial.tuttimer3 Timer.3 - Binding arguments to a handl ``''''''``// timer.cpp ``''''''``// ~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -389,7 +389,7 @@ Next: [link boost_asio.tutorial.tuttimer4 Timer.4 - Using a member function as a ``''''''``// timer.cpp ``''''''``// ~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -550,7 +550,7 @@ Next: [link boost_asio.tutorial.tuttimer5 Timer.5 - Synchronising handlers in mu ``''''''``// timer.cpp ``''''''``// ~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -750,7 +750,7 @@ Previous: [link boost_asio.tutorial.tuttimer4 Timer.4 - Using a member function ``''''''``// timer.cpp ``''''''``// ~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -965,7 +965,7 @@ Next: [link boost_asio.tutorial.tutdaytime2 Daytime.2 - A synchronous TCP daytim ``''''''``// client.cpp ``''''''``// ~~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -1133,7 +1133,7 @@ Next: [link boost_asio.tutorial.tutdaytime3 Daytime.3 - An asynchronous TCP dayt ``''''''``// server.cpp ``''''''``// ~~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -1383,7 +1383,7 @@ Next: [link boost_asio.tutorial.tutdaytime4 Daytime.4 - A synchronous UDP daytim ``''''''``// server.cpp ``''''''``// ~~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -1603,7 +1603,7 @@ Next: [link boost_asio.tutorial.tutdaytime5 Daytime.5 - A synchronous UDP daytim ``''''''``// client.cpp ``''''''``// ~~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -1746,7 +1746,7 @@ Next: [link boost_asio.tutorial.tutdaytime6 Daytime.6 - An asynchronous UDP dayt ``''''''``// server.cpp ``''''''``// ~~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -1961,7 +1961,7 @@ Next: [link boost_asio.tutorial.tutdaytime7 Daytime.7 - A combined TCP/UDP async ``''''''``// server.cpp ``''''''``// ~~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -2238,7 +2238,7 @@ Previous: [link boost_asio.tutorial.tutdaytime6 Daytime.6 - An asynchronous UDP ``''''''``// server.cpp ``''''''``// ~~~~~~~~~~ ``''''''``// - ``''''''``// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) + ``''''''``// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) ``''''''``// ``''''''``// Distributed under the Boost Software License, Version 1.0. (See accompanying ``''''''``// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/tutorial.xsl b/doc/tutorial.xsl index 7c0f4924..046be1da 100644 --- a/doc/tutorial.xsl +++ b/doc/tutorial.xsl @@ -2,7 +2,7 @@