Commit Graph
104 Commits
Author SHA1 Message Date
Vinnie Falco 1e303b0cf6 Fields concept work 2017-06-07 18:18:55 -07:00
Vinnie Falco a1848f09ce Add HEAD request example 2017-06-04 17:26:21 -07:00
Vinnie Falco ddfbfbf172 Use <iosfwd> instead of <ostream> 2017-06-04 17:26:21 -07:00
Vinnie Falco e18efedcd1 Documentation work 2017-06-04 14:51:40 -07:00
Vinnie Falco d3a5a05424 Documentation work 2017-06-03 21:03:05 -07:00
Vinnie Falco acf18fba1b Tidy up traits
fix #406
2017-06-03 18:40:20 -07:00
Vinnie Falco 6cb188ea45 Remove detail::sync_ostream
fix #418
2017-06-03 18:25:15 -07:00
Vinnie Falco 7cb442cd89 Make buffer_prefix_view public
fix #408
2017-06-03 11:29:48 -07:00
Vinnie Falco ef0b121c59 Rename to buffer_cat_view (API Change)
fix #408
2017-06-03 11:29:48 -07:00
Vinnie Falco 1ee3013261 Fix leak in basic_flat_buffer 2017-06-03 00:14:49 -07:00
Vinnie Falco fe75a7ca2a Refactor HTTP serialization and parsing (API Change):
fix #404

Parsing and serialization interfaces have been fine tuned and unified.

For parsing these stream operations are defined:

* read
* read_header
* read_some
* async_read
* async_read_header
* async_read_some

For serialization these stream operations are defined:

* write
* write_header
* write_some
* async_write
* async_write_header
* async_write_some
2017-06-02 19:12:34 -07:00
Vinnie Falco 50cba32565 buffer_size overload for basic_multi_buffer::const_buffers_type 2017-06-02 10:35:26 -07:00
Vinnie Falco c29451a8dd Refactor type_traits (API Change):
fix #373

* concepts.hpp is renamed to type_traits.hpp

* Body reader and writer concepts are renamed
2017-05-28 16:00:05 -07:00
Vinnie Falco 6ba36974d1 Disable reverse_iterator buffer_view test 2017-05-28 15:37:51 -07:00
Vinnie Falco 266ebac7b7 buffer_view skips empty buffer sequences 2017-05-28 15:37:50 -07:00
Vinnie Falco 7a5e87eb80 Workaround for boost::asio::basic_streambuf type check 2017-05-24 15:14:07 -07:00
Vinnie Falco f205976949 Make buffers_adapter meet requirements
fix #386
2017-05-24 12:39:37 -07:00
Vinnie Falco 8e39c604a4 Tidy up is_dynamic_buffer traits test 2017-05-24 12:39:36 -07:00
Vinnie Falco 949504a03e Fix async return values in docs 2017-05-24 12:36:08 -07:00
Vinnie Falco cd9f41b1a0 Use BOOST_STATIC_ASSERT
fix #380
2017-05-24 12:36:08 -07:00
Vinnie Falco 1b616fa1da Tidy up and make get_lowest_layer public
fix #379
2017-05-24 12:36:08 -07:00
Vinnie Falco 612e616978 Require Boost 1.58 or later 2017-05-24 12:36:08 -07:00
Vinnie Falco 1b1daa7b29 Tidy up read_size_helper and dynamic buffers
fix #376
2017-05-24 12:36:07 -07:00
Vinnie Falco bf0145da67 Use BOOST_THROW_EXCEPTION
fix #370
2017-05-24 12:36:07 -07:00
Vinnie Falco 50e5123996 Additional constructors for consuming_buffers 2017-05-21 07:55:02 -07:00
Vinnie Falco 3aa87e076c Tidy up buffer_prefix overloads and test 2017-05-21 07:55:01 -07:00
Vinnie Falco bee583cac1 Fix strict aliasing warnings in buffers_view 2017-05-21 07:55:00 -07:00
Vinnie Falco 0bdb148765 Make buffers_view a public interface 2017-05-18 19:38:58 -07:00
Vinnie Falco 784f965a69 Fix javadoc typo 2017-05-15 11:31:32 -07:00
Vinnie Falco 88adbdd95e Remove handler helpers, tidy up hook invocations (API Change) 2017-05-14 15:00:52 -07:00
Vinnie Falco 4974af2972 Rename prepare_buffer(s) to buffer_prefix (API Change) 2017-05-14 15:00:52 -07:00
Vinnie Falco d81196294f Concept revision and documentation (API Change):
The concept type traits are renamed for consistency,
and consolidated into a single header file <beast/core/type_traits.hpp>

A new section, Core Concepts, is added to the documentation describing all
of the core utility classes and functions. This also includes a complete
explanation and sample program describing how to write asynchronous initiation
functions and their associated composed operations.
2017-05-14 15:00:34 -07:00
Vinnie Falco bdae92a8b4 Replace asynchronous helper macros with template aliases (API Change) 2017-05-12 17:40:00 -07:00
Vinnie Falco df95a09024 Move prepare_buffers to prepare_buffer.hpp (API Change)
fix #338
2017-05-10 13:17:28 -07:00
Vinnie Falco 787de2111b Remove placeholders (API Change) 2017-05-10 13:08:43 -07:00
Vinnie Falco 9b240c71af Fix basic_streambuf movable trait 2017-05-10 05:36:00 -07:00
Vinnie Falco 76a2617d2e Consolidate get_lowest_layer in type_traits.hpp
fix #347
2017-05-09 19:38:49 -07:00
Vinnie Falco 6d003216b7 Add to_static_string:
This function converts integers to their decimal
representation as a static string.

In addition, static_string::resize no longer initializes
characters if the new size is larger.
2017-05-09 19:38:49 -07:00
Vinnie Falco 59b2f8fefd ostream workaround for gcc 4.8.4 2017-05-09 07:23:10 -07:00
Vinnie Falco 8363d869a0 Increase ostream test coverage 2017-05-09 07:23:10 -07:00
Vinnie Falco 2bf515069d Harmonize concepts and identifiers with net-ts (API Change):
fix #321

This synchronizes identifier names and some implementation details
with the Networking-TS document and reference implementation.
The following interfaces have changed:

* async_completion
* is_buffer_sequence (removed)
* is_const_buffer_sequence (was is_ConstBufferSequence)
* is_dynamic_buffer (was is_DynamicBuffer)
* is_mutable_buffer_sequence (was is_MutableBufferSequence)
* async_result (new)
* BEAST_HANDLER_TYPE macro (new)
* BEAST_INITFN_RESULT_TYPE macro (new)

Filename changes:

* async_result.hpp (was async_completion.hpp)
2017-05-09 07:23:09 -07:00
Vinnie Falco 1c9067b1da Use beast::string_view alias 2017-05-09 07:23:09 -07:00
Vinnie Falco e2b5c317fc Rename to buffered_read_stream (API Change):
dynabuf_readstream is renamed to buffered_read_stream.
2017-05-09 07:23:08 -07:00
Vinnie Falco a753f1cb38 Rename to static_buffer, static_buffer_n (API Change):
These classes are renamed:

* static_streambuf to static_buffer
* static_streambuf_n to static_buffer_n
2017-05-09 07:23:08 -07:00
Vinnie Falco 24b66864d8 Rename to flat_buffer, basic_flat_buffer (API Change):
These classes are renamed:

* flat_streambuf to flat_buffer
* basic_flat_streambuf to basic_flat_buffer
2017-05-09 07:23:08 -07:00
Vinnie Falco 69259efe87 Rename to multi_buffer, basic_multi_buffer (API Change):
These classes are renamed:

* streambuf to multi_buffer
* basic_streambuf to basic_multi_buffer
2017-05-09 07:23:07 -07:00
Vinnie Falco bef9ae11ea New buffers() replaces to_string() (API Change):
A new function, buffers(), returns an implementation defined object
which wraps a ConstBufferSequence and supports formatting to a
std::ostream.

The function to_string is removed, as the new implementation allows
conversion to string using boost::lexical_cast on the return value
of the call to buffers(). Streaming to an output stream is more
efficient: no dynamic allocations are performed.

Example:

    streambuf sb;
    std::cout << buffers(sb.data()) << std::endl;
2017-05-09 07:23:04 -07:00
Vinnie Falco a7ef4f53dc New ostream() returns dynamic buffer output stream (API Change):
This eliminates beast::write output for dynamic buffers and replaces
it with the function ostream() that wraps a caller provided dynamic
buffer and returns the result as a std::ostream derived object.
Callers may now produce formatted output into any object meeting the
requirements of DynamicBuffer using operator<< and the standard stream
modifiers such as std::endl.

This new technique is more efficient, as implementations of operator<<
can now write directly into the output using std::ostream::write and
std::ostream::put.

Example of use:

  beast::streambuf sb;
  beast::ostream(sb) << "Hello, world!" << std::endl;
2017-05-08 15:46:03 -07:00
Vinnie Falco 6df3ff3f0f Refactor base64:
The implementation no longer uses std::string
and instead works on raw memory buffers, which
must be pre-sized accordingly.
2017-05-07 13:39:39 -07:00
Vinnie Falco 19b124dbd3 Refactor static_string:
static_string interface now closely matches std::basic_string.
2017-05-07 13:39:39 -07:00