From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-10-15 08:13:43
I have just released asio 0.3.4. You can download it, or view the
documentation online, at http://asio.sourceforge.net.
The major changes in this version include support for scatter-gather
operations, an initial SSL implementation, and documentation
improvements including an HTTP 1.0 server example. Code that uses asio
will need to be updated.
It is my feeling that there are no more major interface changes to be
made, and my next goal is to convert asio into "Boost format" in
preparation for a submission. Feedback is appreciated.
In detail, the changes since asio 0.3.3 include:
- Added support for scatter-gather on all read and write operations.
These operations now take a list of one or more "buffers" for the
operation. These buffers may be created to represent raw memory, POD
arrays, boost::array or std::vector.
This change breaks existing code, which needs to be fixed as
follows. Where one used to write:
one now needs to write:
Similar changes are needed on all read, write, send and receive
operations, both synchronous and asynchronous.
- Added initial SSL support using OpenSSL. This takes the form of a
template, called asio::ssl::stream, which can be used with any class
which supports the Sync_*_Stream and Async_*_Stream concepts, e.g.:
typedef asio::ssl::stream<asio::stream_socket> my_ssl_socket;
Please note that for now this only works when used with
single-threaded demuxers. A big thanks to Indrek Juhani of Voipster
for developing the core implementation, and to Dirk Griffioen for
organising this contribution.
- Exceptions in handlers are no longer suppressed using catch (...).
Instead they are now allowed to propagate out of the
basic_demuxer::run function so they may be caught by application
code. After an exception is caught, basic_demuxer::run may be called
again immediately to continue processing.
- Replaced the basic_demuxer::work_started/work_finished classes with
an RAII class called basic_demuxer::work.
- Added iostream output operators for ipv4::address,
ipv4::tcp::endpoint and ipv4::udp::endpoint.
- Added an HTTP 1.0 server example.
- Added a kqueue reactor implementation for Mac OS X. Thanks to Stefan
Arentz for providing the initial implementation.
- Improved error handling in the epoll_reactor.
- TSS slot usage has been minimised to use one slot for all demuxers
of a given type, rather than one slot per demuxer object.
- The calls to WSAStartup and WSACleanup have been made safer with
respect to global demuxer objects.
- Automaticaly link in ws2_32.lib when using asio on Win32 with Visual
C++ or Borland C++.
- Added back missing implementation of get_remote_endpoint.
- Visual C++ 6 and gcc 2.95.x are not supported in this version, due
to lack of testing resources.
- Many documentation improvements.
Note that I chose not to rename the send/receive family of functions to
write and read, as had been discussed. After further thought I came to
the conclusion that functions should only have the same name if they
provide the same semantics. I think it's fair to say that read and
write are the ideal names for the stream concepts' operations. However
stream_socket's send and receive functions take additional parameters
(flags) that can significantly alter the semantics (e.g. peek). A
similar thing applies to not renaming datagram_socket's
send/send_to/receive/receive_from functions, which are
datagram-oriented, as opposed to the stream concepts' read and write
which are (obviously) stream-oriented.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk