Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-11-18 07:06:03

Hello all,

I have just released asio 0.3.5. You can download it, or view the
documentation online, at

The download page includes packages named boost-asio-proposal-*, which
contain a version of asio converted into boost format. You can copy the
contents of one of these into a boost_1_33_0 distribution and build it
there, but it should also support building in its own directory,
provided you set a BOOST_ROOT environment variable. The Jamfiles are a
little rough, but they should work in theory.

The size of the release is actually less than 0.3.4, which I think is a
good sign :)

In detail, the changes since asio 0.3.4 include:

- Consolidated the free functions read(), read_n() and
  read_at_least_n() into a function named read(); write(),
  write_n() and write_at_least_n() into just write(); and
  likewise for their asynchronous counterparts. The default
  behaviour of read() and write() is now to attempt to transfer
  all of the data (i.e. equivalent to old read_n() and
  write_n()). The _at_least_n() behaviour can be obtained by
  passing a Completion_Condition function object:
    asio::read(s, bufs, asio::transfer_at_least(32));

- Renamed the Stream concept's read(), async_read(), write() and
  async_write() functions to read_some(), async_read_some(),
  write_some() and async_write_some() respectively. This was
  done to make it obvious to a library user that the operation
  can result in a short read or write. The name write() in
  particular was found to be error prone, since most of the time
  it will successfully transfer all of the data. Only occasional
  calls would result in a short write, leading to hard to find

- Graceful connection closure now causes a read to complete with
  an error code (asio::error::eof) rather than returning 0. This
  removes the need for separate total_bytes_transferred and
  last_bytes_transferred handler parameters. It allows a
  function, such as asio::read() and asio::write(), to return an
  error to indicate that it is unable to fulfil its contract due
  to EOF.

- Removed the asio::buffers() function and the ability to
  automatically chain buffer objects together. Instead, the
  asio::buffer() function now returns a type that meets the
  Const_Buffers or Mutable_Buffers concepts as appropriate.
  Scatter-gather I/O should now be performed by explicitly
  placing const_buffer or mutable_buffer objects into a
  container (such as std::vector, std::list or boost::array). To
  read into a single buffer you would now write:, length));
  To send multiple buffers you would use something like:
    std::vector<asio::const_buffer> bufs;
    bufs.push_back(asio::buffer(data1, length1));
    bufs.push_back(asio::buffer(data2, length2));

- Added comparison operators to the asio::ipv4::tcp::endpoint
  and asio::ipv4::udp::endpoint classes.

- Removed the error handling expression templates. This
  functionality is better covered by a library such as

- Removed the fixed_buffer class from the library's public
  interface. The underlying buffer storage is no longer a
  template parameter on the buffered*_stream classes.

- Removed the wrapped_handler class from the library's public

- Removed the consuming_buffers class from the libary's public

- Added new certificates for the SSL example, as the original
  ones expired after one month.

- Used implementation-defined types rather than void* in the
  Socket_Option and IO_Control_Command concepts to avoid losing
  type safety.

- Various code cleanup and bug fixes.

- Added support for MSVC 8.0.

- Documentation improvements.


Boost list run by bdawes at, gregod at, cpdaniel at, john at