Commit Graph

51 Commits

Author SHA1 Message Date
Christopher Kohlhoff
ae04c26689 Update copyright notices. 2019-02-17 19:59:39 -10:00
Christopher Kohlhoff
a72fbb0b86 Remove deprecated get_io_context and get_io_service functions. 2019-02-17 19:59:20 -10:00
Christopher Kohlhoff
d6e731e145 Add back accidentally deleted import of 'os'. 2018-04-03 19:43:07 +10:00
Christopher Kohlhoff
41fbd65fc7 Need to link boost.chrono in tests and C++03 examples. 2018-04-03 19:41:26 +10:00
Christopher Kohlhoff
d23cb643d9 Fix cross-compilation support. 2018-04-01 21:45:55 +10:00
Christopher Kohlhoff
886839cf55 Update copyright notices. 2018-03-04 21:59:30 +11:00
Christopher Kohlhoff
094354f343 Remove old Jamfiles. 2017-12-02 09:51:28 +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
2b6230aef8 Make sure asio/ssl/error.hpp is self-contained. 2017-03-05 22:58:18 +11:00
Christopher Kohlhoff
f7fa336c91 Update copyright notices. 2017-03-05 22:43:47 +11:00
Christopher Kohlhoff
36eef63a9c Update copyright notices. 2016-09-11 11:35:40 +10:00
Jessica Hamilton
df50982934 Haiku: link to libnetwork 2015-12-10 22:45:24 +11:00
Christopher Kohlhoff
41bf42b8da Update copyright notices. 2015-03-20 00:14:19 +11:00
Christopher Kohlhoff
3e2e9c8f97 Remove dependency on Boost.Test. 2015-03-20 00:04:57 +11:00
Christopher Kohlhoff
28f690f504 Update copyright notices. 2014-05-03 09:25:39 +10:00
Christopher Kohlhoff
50fa08dbdc Change unit tests so that they don't depend on Boost.Thread.
[SVN r85800]
2013-09-20 12:04:00 +00:00
Christopher Kohlhoff
95d16d75b7 Update copyright notices.
[SVN r84345]
2013-05-18 11:24:59 +00:00
Christopher Kohlhoff
6bc7463804 Add set_verify_depth function to SSL context and stream.
Thanks go to Nick Jones <nick dot fa dot jones at gmail dot com>, on
whose work this commit is based.


[SVN r84322]
2013-05-17 11:00:49 +00:00
Christopher Kohlhoff
1c9d4a1ac3 Support handshake with re-use of data already read from the wire.
Add new overloads of the SSL stream's handshake() and async_handshake()
functions, that accepts a ConstBufferSequence to be used as initial
input to the ssl engine for the handshake procedure.

Thanks go to Nick Jones <nick dot fa dot jones at gmail dot com>, on
whose work this commit is partially based.


[SVN r84319]
2013-05-17 10:52:08 +00:00
Christopher Kohlhoff
9644fab951 Partially decouple Asio from other boost components via an extra level
of indirection.


[SVN r84315]
2013-05-17 10:06:50 +00:00
Christopher Kohlhoff
be0221203a Add new traits classes, handler_type and async_result, that allow
the customisation of the return type of an initiating function.


[SVN r84308]
2013-05-16 23:26:04 +00:00
Christopher Kohlhoff
30f3e430a7 Update copyright notices.
[SVN r76420]
2012-01-11 23:04:08 +00:00
Christopher Kohlhoff
06747ea7c9 * Add documentation for new asio::buffer() overloads for std::array.
* Improve backward compatibility of the new SSL implementation.

* Add wrapper for SSL_CTX_set_default_verify_paths().

* Document which OpenSSL functions the ssl::context member functions use.

* Add SSL certificate verification callbacks, and add a new
  ssl::rfc2818_verification function object for simple peer certificate
  verification based on the host name.

* Use std::atomic<> when available.

* Prefer to use std::array when it is available.

* Use std::shared_ptr and std::weak_ptr when available.

* Use a lightweight scoped smart pointer.

* Fix some shadow variable warnings with g++ 4.6.


[SVN r70384]
2011-03-22 01:21:50 +00:00
Christopher Kohlhoff
ad1c100832 New SSL implementation.
[SVN r70096]
2011-03-18 00:25:54 +00:00
Christopher Kohlhoff
7139b456d2 Changes for asio version 1.5.0:
* Added support for timeouts on socket iostreams, such as
  ip::tcp::iostream. A timeout is set by calling expires_at() or
  expires_from_now() to establish a deadline. Any socket operations
  which occur past the deadline will put the iostream into a bad state.

* Added a new error() member function to socket iostreams, for
  retrieving the error code from the most recent system call.

* Added a new basic_deadline_timer::cancel_one() function. This function
  lets you cancel a single waiting handler on a timer. Handlers are
  cancelled in FIFO order.

* Added a new transfer_exactly() completion condition. This can be used
  to send or receive a specified number of bytes even if the total size
  of the buffer (or buffer sequence) is larger.

* Added new free functions connect() and async_connect(). These
  operations try each endpoint in a list until the socket is
  successfully connected.

* Extended the buffer_size() function so that it works for buffer
  sequences in addition to individual buffers.

* Added a new buffer_copy() function that can be used to copy the raw
  bytes between individual buffers and buffer sequences.

* Added new non-throwing overloads of read(), read_at(), write() and
  write_at() that do not require a completion condition.

* Added friendlier compiler errors for when a completion handler does
  not meet the necessary type requirements. When C++0x is available
  (currently supported for g++ 4.5 or later, and MSVC 10), static_assert
  is also used to generate an informative error message. Checking may be
  disabled by defining BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS.

* Made the is_loopback(), is_unspecified() and is_multicast() functions
  consistently available across the ip::address, ip::address_v4 and
  ip::address_v6 classes. Refs #3939.

* Added new non_blocking() functions for managing the non-blocking
  behaviour of a socket or descriptor. The io_control() commands named
  non_blocking_io are now deprecated in favour of these new functions.

* Added new native_non_blocking() functions for managing the
  non-blocking mode of the underlying socket or descriptor. These
  functions are intended to allow the encapsulation of arbitrary
  non-blocking system calls as asynchronous operations, in a way that is
  transparent to the user of the socket object. The functions have no
  effect on the behaviour of the synchronous operations of the socket or
  descriptor. Refs #3307.

* Added the io_control() member function for socket acceptors.
  Refs #3297.

* For consistency with the C++0x standard library, deprecated the
  native_type typedefs in favour of native_handle_type, and the native()
  member functions in favour of native_handle().

* Added a release() member function to posix descriptors. This function
  releases ownership of the underlying native descriptor to the caller.
  Refs #3900.

* Added support for sequenced packet sockets (SOCK_SEQPACKET).

* Added a new io_service::stopped() function that can be used to
  determine whether the io_service has stopped (i.e. a reset() call is
  needed prior to any further calls to run(), run_one(), poll() or
  poll_one()).

* Reduced the copying of handler function objects.

* Added support for C++0x move construction to further reduce copying of
  handler objects. Move support is enabled when compiling in -std=c++0x
  mode on g++ 4.5 or higher, or when using MSVC10.

* Removed the dependency on OS-provided macros for the well-known IPv4
  and IPv6 addresses. This should eliminate the annoying "missing braces
  around initializer" warnings. Refs #3741.

* Reduced the size of ip::basic_endpoint<> objects (such as
  ip::tcp::endpoint and ip::udp::endpoint).

* Changed the reactor backends to assume that any descriptors or sockets
  added using assign() may have been dup()-ed, and so require explicit
  deregistration from the reactor. Refs #4971.

* Changed the SSL error category to return error strings from the
  OpenSSL library.

* Changed the separate compilation support such that, to use Asio's SSL
  capabilities, you should also include 'asio/ssl/impl/src.hpp in one
  source file in your program.

* Removed the deprecated member functions named io_service(). The
  get_io_service() member functions should be used instead.

* Removed the deprecated typedefs resolver_query and resolver_iterator
  from the ip::tcp, ip::udp and ip::icmp classes.

* Fixed a compile error on some versions of g++ due to anonymous enums.
  Refs #4883.

* Added an explicit cast to the FIONBIO constant to int to suppress a
  compiler warning on some platforms. Refs #5128.

* Fixed warnings reported by g++'s -Wshadow compiler option. Refs #3905.


[SVN r69194]
2011-02-23 01:04:16 +00:00
Christopher Kohlhoff
b1dced94c8 Update copyright notice.
[SVN r68086]
2011-01-13 08:14:05 +00:00
Christopher Kohlhoff
986c2b8e9a Make unit tests build faster.
[SVN r65998]
2010-10-16 04:30:12 +00:00
Christopher Kohlhoff
20a822c591 Update copyright notices.
[SVN r58623]
2010-01-02 01:24:52 +00:00
Christopher Kohlhoff
aea347d0a7 Add const overloads of the lowest_layer member functions.
[SVN r48535]
2008-09-02 11:34:18 +00:00
Christopher Kohlhoff
8768d9dff1 Fix or suppress MSVC level 4 warnings. Fixes #1703.
[SVN r44727]
2008-04-22 23:46:15 +00:00
Christopher Kohlhoff
02e47999fa Update copyright notices.
[SVN r43473]
2008-03-03 14:13:01 +00:00
Christopher Kohlhoff
f99a3cb814 Update copyright notices.
[SVN r43472]
2008-03-03 14:05:35 +00:00
Christopher Kohlhoff
ff29c1bcfb Only define _XOPEN_SOURCE_EXTENDED when building with gcc on HP-UX.
[SVN r43302]
2008-02-18 13:33:23 +00:00
Christopher Kohlhoff
86dc84f36d Need to define _XOPEN_SOURCE_EXTENDED when compiling for HP-UX.
[SVN r43221]
2008-02-11 13:59:44 +00:00
Christopher Kohlhoff
5af39ab4ef Make Windows XP the default target Windows version as the latest Windows
SDK doesn't support IPv6 for Windows 2000 targets.


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


[SVN r39100]
2007-09-01 07:32:28 +00:00
Vladimir Prus
00be9349dc Revive V1 Jamfiles at Christopher's request
[SVN r38822]
2007-08-21 13:55:41 +00:00
Vladimir Prus
fb46c8923e Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
Christopher Kohlhoff
1248ab625c Try to fix Borland C++ compile errors.
[SVN r37722]
2007-05-20 03:50:23 +00:00
Christopher Kohlhoff
72826c07c9 Add empty test cases to eliminate spurious failures when running all tests.
[SVN r37607]
2007-05-06 22:38:53 +00:00
Christopher Kohlhoff
3e72c27764 Update copyright strings to include 2007.
[SVN r36757]
2007-01-19 01:57:08 +00:00
Christopher Kohlhoff
2b4748aaaa Update copyright strings to include 2007.
[SVN r36581]
2007-01-04 05:53:07 +00:00
Christopher Kohlhoff
bc63a367f9 Add BBv2 support.
[SVN r36412]
2006-12-16 02:27:07 +00:00
Christopher Kohlhoff
c7f491b73e Fix comment headers to match file names.
[SVN r35941]
2006-11-09 03:02:19 +00:00
Christopher Kohlhoff
852668d1da Change error handling to match TR2 proposal.
[SVN r35911]
2006-11-08 05:32:17 +00:00
Christopher Kohlhoff
da2ef49a00 Add max_size() function to basic_streambuf.
Make basic_io_object constructor protected.

Make a 0-length send or receive on a stream socket into a no-op.

Add cancel() function for cancelling asynchronous socket operations.
The Win32 implementation only works if all operations for the socket
have been issued from the same thread, otherwise it fails with
asio::error::not_supported.

Add workaround for an apparent Windows bug where using getpeername on
a socket accepted using AcceptEx will sometimes return an endpoint
that is all zeroes.

Make a strand last as long as it has any handlers to dispatch. Make
strand a nested class of io_service.

Add io_service() function to io_service::work to return a reference to
the io_service object on which the work is being performed. Renamed
io_service::service::owner() to io_service::service::io_service().

Unset linger object when socket objects are destroyed.

Rename asio_handler_dispatch to asio_handler_invoke.

Rename basic_socketbuf to basic_socket_streambuf.

Update ip::address_v4 and ip::address_v6 classes to match TR2
proposal.

Add run_one(), poll() and poll_one() functions to the io_service.

Remove need to #define FD_SETSIZE on Win32.

Add detection of incorrect inclusion of WinSock.h.

Fix some SSL bugs. Add ability to customise the SSL password callback
function.

Set the reuse_address option by default on acceptors.

The macros FIONREAD and FIONBIO are not integer constants on all
platforms, and so cannot be used as template arguments. Make the
corresponding I/O control commands into proper classes, not templates.

Fixes to better support *BSD platforms.

Add support for buffer debugging, if the standard library supports
iterator debugging (as MSVC8's standard lib does).

Ensure the IOCP queue is drained correctly at shutdown.

Move basic_resolver and resolver service into the ip namespace.

Fix some issues found by the inspect tool.


[SVN r35833]
2006-11-04 07:14:10 +00:00
Christopher Kohlhoff
0c65769b47 Add copyright notices.
[SVN r34726]
2006-07-25 11:04:06 +00:00
Christopher Kohlhoff
6c47408f2b Test that all ssl::stream functions compile.
[SVN r34333]
2006-06-18 08:03:35 +00:00