Commit Graph

2155 Commits

Author SHA1 Message Date
Christopher Kohlhoff
3d5367da14 Cast the result of GetProcAddress. 2017-03-05 21:58:10 +11:00
Ryan Pavlik
13aff85067 Fix configure.ac to support mingw64 2017-03-05 21:51:52 +11:00
ala
b4149d5aa7 Replace commas by semicolons
clang 3.9.0 has a new warning:

  possible misuse of comma operator here [-Wcomma]
2017-03-05 21:46:43 +11:00
Christopher Kohlhoff
ced6124d2c Fix mutex initialisation for Windows 8.1 store apps. 2017-03-05 20:10:34 +11:00
Christopher Kohlhoff
1ea732c562 Make sure asio/ssl/error.hpp is self-contained. 2017-03-05 19:46:10 +11:00
Christopher Kohlhoff
cc1bd58f9e Avoid double construction in converting move-constructors. 2017-02-28 07:31:15 +11:00
Christopher Kohlhoff
2cd93bd194 Macro-protect use of 'max'. 2017-02-27 23:25:33 +11:00
Christopher Kohlhoff
d3ca90a05c Add ability to release ownership of the underlying native socket.
This commit adds release() member functions to basic_socket and
basic_socket_acceptor.

Note: When using I/O completion ports on Windows, these functions fail
with error::operation_not_supported for versions of Windows prior to
Windows 8.1.
2017-02-24 21:53:29 +11:00
Christopher Kohlhoff
d28ec54750 A short read does not always mean the socket is exhausted, as an EOF could follow. 2017-01-25 08:39:26 +11:00
Marcel Raad
dc2b5b9ac0 Fix compilation with OpenSSL 1.1 API
With OPENSSL_API_COMPAT=0x10100000L, SSL_library_init, SSL_load_error_strings, and OpenSSL_add_all_algorithms are removed.
With OPENSSL_API_COMPAT=0x10000000L, these are function-style macros mapping to OPENSSL_init_ssl, which is called automatically anyway.

References:
https://www.openssl.org/docs/man1.1.0/ssl/OPENSSL_init_ssl.html
https://www.openssl.org/docs/man1.1.0/crypto/OPENSSL_init_crypto.html
2017-01-19 08:03:16 +11:00
Christopher Kohlhoff
76fe1c8aba Suppress some spurious unused variable warnings. 2017-01-18 08:32:59 +11:00
Christopher Kohlhoff
f3f324cbe9 Include socket_types.hpp before OpenSSL headers. 2017-01-18 08:00:22 +11:00
Christopher Kohlhoff
647d2dc956 In c++11 or later, use allocator_traits to rebind allocators. 2017-01-17 09:47:12 +11:00
Christopher Kohlhoff
22924d3a0f Fix up some comments on #endif preprocessor directives. 2017-01-17 08:07:54 +11:00
Nicholas Fish
bc87d093d1 Re-enable building against LibreSSL 2017-01-16 10:33:42 +11:00
Christopher Kohlhoff
ffc9dd443f Implement fenced_block using std::atomic_thread_fence, when available. 2017-01-16 10:33:42 +11:00
Christopher Kohlhoff
595ff85c33 Add workaround for broken getaddrinfo in Apple's NAT64 environment. 2017-01-14 12:28:00 +11:00
Christopher Kohlhoff
bc6e494d2d Fix composed read/write operations when multiple buffers are supplied. 2017-01-13 09:42:23 +11:00
Christopher Kohlhoff
14db6371b3 Regenerate documentation. 2016-09-24 10:43:48 +10:00
Christopher Kohlhoff
b9d2d3ef0d Fix some long lines. 2016-09-24 10:43:48 +10:00
Christopher Kohlhoff
0fe8f4ded4 A smart pointer is not required to hold the work. 2016-09-24 10:43:48 +10:00
Christopher Kohlhoff
8737ab0f2f Update template parameter names in forward declaration to match implementation. 2016-09-24 10:43:48 +10:00
Christopher Kohlhoff
cb22512a90 Use string_view in basic_resolver and basic_resolver_entry. 2016-09-23 10:05:04 +10:00
Christopher Kohlhoff
6c97b611fd Add tests for network_v* iostream output. 2016-09-23 10:04:33 +10:00
Christopher Kohlhoff
0090e946ee Add string_view overloads for the make_network*() functions. 2016-09-23 10:04:33 +10:00
Christopher Kohlhoff
6503b3f33a Fix description of make_network_*() functions. 2016-09-23 10:04:33 +10:00
Christopher Kohlhoff
41cf38be81 Add string_view overloads for the make_address*() functions. 2016-09-23 10:04:32 +10:00
Christopher Kohlhoff
9c3c09ab68 Add string_view support to read_until and async_read_until. 2016-09-23 10:04:32 +10:00
Christopher Kohlhoff
0d7abb65fe Add buffer() overloads for basic_string_view. 2016-09-23 10:04:32 +10:00
Christopher Kohlhoff
69a03d7b6b Rename DynamicBufferSequence to DynamicBuffer, is_dynamic_buffer_sequence to is_dynamic_buffer. 2016-09-21 18:21:55 +10:00
Christopher Kohlhoff
7b0a61e300 Defer assigning accepted socket until immediately before handler.
Fixes a problem in the reactor-based async_accept, if the
basic_socket::assign() operation throws due to an out-of-memory
condition.
2016-09-16 07:57:56 +10:00
Christopher Kohlhoff
a2e070a79e Fix exception safety issue in hash_map. 2016-09-13 22:51:28 +10:00
Christopher Kohlhoff
b1b9e5c4a6 Add workaround for move-detection issue on MSVC 2015 Update 2. 2016-09-13 22:46:39 +10:00
Christopher Kohlhoff
2cde22623c Call SSL_COMP_free_compression_methods() on ssl cleanup.
This call is needed for OpenSSL >=1.0.2 and <1.1.0.
2016-09-13 21:59:03 +10:00
Christopher Kohlhoff
41cb2faa19 Additional libraries required to link Boost.Coroutine. 2016-09-11 12:51:04 +10:00
Christopher Kohlhoff
af9770ac49 Use new TLS methods on OpenSSL 1.1.0. 2016-09-11 12:49:17 +10:00
Christopher Kohlhoff
7249bcc143 Backward compatibility for code using OpenSSL < 1.1.0.
Some application code using asio::ssl::stream<> explicitly tests for the
SSL_R_SHORT_READ error. For compatibility, when using older versions of
OpenSSL we will define the ssl::error::stream_truncated to use this
value.
2016-09-11 12:49:09 +10:00
Christopher Kohlhoff
503b8bb172 Fix allocator usage to compile with g++ 6. 2016-09-11 07:52:23 +10:00
Christopher Kohlhoff
6cec69ea0c Disable speculative operations after a short read or write.
When using epoll, interpret a short read or write on a stream-oriented
socket as an indication that we should wait for a readiness event. After
this condition, speculative operations are disabled until we receive the
event notification from epoll.
2016-09-11 07:52:23 +10:00
Christopher Kohlhoff
c9e33cee0e New special concurrency hints. 2016-09-09 18:02:38 +10:00
Christopher Kohlhoff
6ef25d7722 The null_event must sleep for correct behaviour of timed run functions. 2016-09-09 14:33:44 +10:00
Christopher Kohlhoff
79e3edd257 Allow use_future support to compile when exceptions are disabled. 2016-09-09 14:33:44 +10:00
Christopher Kohlhoff
85e011bb43 Update socket iostreams to adhere to the TS. 2016-09-09 14:33:44 +10:00
Christopher Kohlhoff
a48d0b4dd8 Add move support for deadline_timer. 2016-09-06 09:19:24 +10:00
Christopher Kohlhoff
be2458a444 Enable getaddrinfo by default on Apple platforms.
The getaddrinfo function is now used by default unless Mac OS X 10.4 or
earlier is detected. Its use may also be explicitly disabled by defining
ASIO_DISABLE_GETADDRINFO.
2016-09-06 07:56:29 +10:00
Christopher Kohlhoff
276846097a Fix dynamic buffer consume() implementation. 2016-09-05 19:24:52 +10:00
Christopher Kohlhoff
7268a3f488 Clean up header inclusion of old services. 2016-09-04 14:39:46 +10:00
Christopher Kohlhoff
26a0c87849 Strip out deprecated, extension and old services code. 2016-09-04 14:13:19 +10:00
Christopher Kohlhoff
348e4bd236 Mark basic_streambuf, regex, and match condition overloads as extensions. 2016-09-04 13:42:16 +10:00
Christopher Kohlhoff
14676ca0a0 Remove redundant deprecated preprocessor test. 2016-09-04 13:41:31 +10:00