Re: [boost] asio networking proposal 0.3.5

While the supported platforms says gcc 3.3 and higher, I had no trouble with linux (2.4 and 2.6), gcc 3.2.3, with the exception of the http server example. The error is below, which is pretty easy to work around. if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"asio\" -DVERSION=\"0.3.5\" -D_REENTRANT=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -I. -I. -I/home/servicesot/ThirdParty/boost/include/boost-1_33/ -I./../include -g -O2 -pthread -ftemplate-depth-256 -MT examples/http/server/mime_types.o -MD -MP -MF "$depbase.Tpo" -c -o examples/http/server/mime_types.o examples/http/server/mime_types.cpp; \ then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi examples/http/server/mime_types.cpp: In function `std::string http::server::mime_types::extension_to_type(const std::string&)': examples/http/server/mime_types.cpp:36: no matching function for call to ` find_type(http::server::mime_types::mapping[5], const std::basic_string<char, std::char_traits<char>, std::allocator<char>
&)'
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Christopher Kohlhoff Sent: Friday, November 18, 2005 7:06 AM To: boost@lists.boost.org Subject: [boost] asio networking proposal 0.3.5 Hello all, I have just released asio 0.3.5. You can download it, or view the documentation online, at http://asio.sourceforge.net. 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 bugs. - 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: sock.read(asio::buffer(data, 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)); sock.write(bufs); - 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 Boost.Lambda. - 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 interface. - Removed the consuming_buffers class from the libary's public interface. - 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. Cheers, Chris _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
participants (1)
-
Moore, J. David