Christopher Kohlhoff
aa0bf0a8b3
Reapply double delete fix, which was overwritten by Networking TS merge.
2017-12-02 09:03:14 +11:00
Christopher Kohlhoff
2e61c6f29f
Add backward compatibility for the old ConnectCondition form.
2017-11-08 00:08:40 +11:00
Christopher Kohlhoff
875788fde3
Ensure make_network_vX error_code overload doesn't throw on invalid prefix length.
2017-11-08 00:08:40 +11:00
Christopher Kohlhoff
f15e842c79
Fix the rights for event objects on UWP.
2017-11-08 00:08:40 +11:00
Christopher Kohlhoff
53f052c9a0
Suppress implicit fallthrough warning on newer gcc.
2017-11-08 00:08:40 +11:00
Christopher Kohlhoff
bfa3e0373e
Fix clang version detection for suppression of unused typedef warning.
2017-11-08 00:08:40 +11:00
Christopher Kohlhoff
a778425068
Fix compile errors in some asio::connect overloads.
2017-11-08 00:08:40 +11:00
Christopher Kohlhoff
d484b66453
Bump minimum MSVC version required for C++11 allocators.
2017-10-25 07:58:21 +11:00
Christopher Kohlhoff
bfe7a04616
Fix compile warning under Emscripten.
2017-10-25 07:57:45 +11:00
Christopher Kohlhoff
59395d663a
Use proper SSL_version() function so that asio can build with BoringSSL.
2017-10-25 07:57:14 +11:00
Christopher Kohlhoff
b60e92b13e
Initial merge of Networking TS compatibility.
...
Merged from chriskohlhoff/asio master branch as of commit
4a4d28b0d24c53236e229bd1b5f378c9964b1ebb.
2017-10-23 21:48:43 +11:00
Christopher Kohlhoff
b002097359
Previous fix introduced a leak, use a better approach.
2017-08-13 07:19:28 +10:00
Christopher Kohlhoff
c8d628ad8a
Fix double delete issue introduced by 3541ec2eb9.
2017-08-13 00:56:54 +10:00
Christopher Kohlhoff
c88c5f7e1c
Version bump.
2017-08-01 22:31:49 +10:00
Christopher Kohlhoff
de42877700
Require gcc >= 4.7 to use standard atomics.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
cdae3dd6b4
Don't use auto_ptr.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
25b6042644
Use deregister_internal_descriptor in signal_set_service.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
38508353af
Make epoll_reactor resistant to events with duplicate user data.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
3541ec2eb9
Don't free the reactor's per-descriptor state until after close.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
4d1b169964
Enable newer language features for recent MSVC versions.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
3b8a8d6636
is_continuation misplaced in reactive socket service.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
84572fb9be
Use poll.h rather than sys/poll.h if possible.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
22d69e570d
Fix MSVC Intellisense detection.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
3a2e196893
Disable __thread keyword extension for android+x86+clang.
2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
3a73a43f62
Version bump.
2017-03-08 06:49:35 +11:00
Christopher Kohlhoff
9bfe806fc1
Ensure winsock2.h is included before windows.h.
2017-03-05 23:00:10 +11:00
Christopher Kohlhoff
991f613b95
Eliminate new clang comma warning.
2017-03-05 22:59:39 +11:00
Christopher Kohlhoff
2b6230aef8
Make sure asio/ssl/error.hpp is self-contained.
2017-03-05 22:58:18 +11:00
Christopher Kohlhoff
fba6c4ccbd
Add limited support for regular file descriptors.
...
The epoll_reactor now supports the use of regular file descriptors with
posix::stream_descriptor, provided the I/O operations on them never fail
with EAGAIN or EWOULDBLOCK. If the descriptor cannot be added to the
epoll set using epoll_ctl, and errno is EPERM (indicating an unsupported
descriptor type), then no error condition is raised. Instead, any
operation which would require a trip through the reactor will fail.
2017-03-05 22:56:48 +11:00
Christopher Kohlhoff
49aa5e1e6c
In c++11 or later, use allocator_traits to rebind allocators.
2017-03-05 22:55:54 +11:00
Christopher Kohlhoff
8e835cccd1
Fix error when OpenSSL compression is disabled at compile time.
2017-03-05 22:54:28 +11:00
Christopher Kohlhoff
16e880c667
Update mingw mutex initialisation to match non-mingw version.
2017-03-05 22:53:59 +11:00
Christopher Kohlhoff
d76c1f0533
Make SSL/TLS version handling more consistent across OpenSSL versions.
...
This adds new enums context_base::tls, context_base::tls_client and
context_base::tls_server. These allow connections to use any supported
TLS version. (N.B. the deprecated version SSLv3 is explicitly disabled
if you use these values.)
2017-03-05 22:53:05 +11:00
Christopher Kohlhoff
9feee12ac2
Avoid double construction in converting move-constructors.
2017-03-05 22:52:07 +11:00
Christopher Kohlhoff
4645a7c351
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
(from Marcel Raad)
2017-03-05 22:50:36 +11:00
Christopher Kohlhoff
fdec9d1d8f
Suppress some spurious unused variable warnings.
2017-03-05 22:49:54 +11:00
Christopher Kohlhoff
6c19ff7482
Include socket_types.hpp before OpenSSL headers.
2017-03-05 22:48:48 +11:00
Christopher Kohlhoff
4808f72a1f
Re-enable building against LibreSSL.
2017-03-05 22:47:57 +11:00
Christopher Kohlhoff
a8cea6a722
Implement fenced_block using std::atomic_thread_fence, when available.
2017-03-05 22:46:59 +11:00
Christopher Kohlhoff
dd18e955fa
Add workaround for broken getaddrinfo in Apple's NAT64 environment.
2017-03-05 22:45:50 +11:00
Christopher Kohlhoff
0a852879f5
Fix exception safety issue in hash_map.
2017-03-05 22:45:09 +11:00
Christopher Kohlhoff
f7fa336c91
Update copyright notices.
2017-03-05 22:43:47 +11:00
Christopher Kohlhoff
a1fb7b0c10
Version bump.
2016-09-19 07:37:14 +10:00
Christopher Kohlhoff
c1acb8a57b
Add workaround for move-detection issue on MSVC 2015 Update 2.
2016-09-16 08:26:04 +10:00
Christopher Kohlhoff
603ebfb5e1
Call SSL_COMP_free_compression_methods() on ssl cleanup.
...
This call is needed for OpenSSL >=1.0.2 and <1.1.0.
2016-09-16 08:20:51 +10:00
Christopher Kohlhoff
42e7869f41
Fix allocator usage to compile with g++ 6.
2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
3d71bdaf23
Use new TLS methods on OpenSSL 1.1.0.
2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
8ea3165df9
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:12:39 +10:00
Christopher Kohlhoff
864ca38b6d
Terminate loop if connect condition returns an end iterator.
2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
54c9424b5a
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-11 12:12:39 +10:00