88 Commits
Author SHA1 Message Date
Vinnie Falco e832baf93f Check compiler feature in Jamfile 2017-10-16 09:16:26 -07:00
Daniel James 66b07798e6 Use unique names for Jam projects 2017-08-01 11:31:50 -07:00
Vinnie Falco b0d7bc2e86 Add bench-zlib 2017-07-31 19:02:47 -07:00
Vinnie Falco df9ec6c7f3 Move bench/ to test/ 2017-07-31 19:02:46 -07:00
Vinnie Falco 809e822789 Refactor test build scripts 2017-07-29 00:26:05 -07:00
Vinnie Falco 698884d8bb Move benchmarks to bench/ 2017-07-28 18:55:32 -07:00
Vinnie Falco 59f7819cf6 Refactor tests Jamfile 2017-07-26 11:46:01 -07:00
Vinnie Falco 8578f3cf76 Update copyrights 2017-07-24 09:42:51 -07:00
Vinnie Falco 7139dd639a Boost prep 2017-07-23 17:34:13 -07:00
Vinnie Falco bd5ab6ffd0 Add wstest benchmark tool 2017-07-20 08:15:32 -07:00
Vinnie Falco beead1a297 Split common tests to a new project 2017-07-20 08:15:29 -07:00
Vinnie Falco 67e3e801cb Exemplars are compiled code
fix #455
2017-07-20 08:15:28 -07:00
Vinnie Falco 65b127d2e6 Tidy up Jamfiles 2017-07-20 08:15:28 -07:00
Vinnie Falco 7b8149cfd4 Move benchmarks to a separate project 2017-07-20 08:15:27 -07:00
Vinnie Falco 9c4b3ed2a7 Only build and run tests in variant=coverage 2017-07-20 08:15:27 -07:00
Vinnie Falco d5f15976e7 Tidy up test build scripts and projects 2017-07-20 08:15:27 -07:00
Vinnie Falco 79eb97fbd6 Add server-framework tests 2017-07-20 08:15:27 -07:00
Vinnie Falco fd9a13b11f New server-framework, full featured server example:
A new server framework is introduced, allowing users to
quickly get off the ground. Example servers are refactored
to use the common framework.
2017-07-20 08:15:26 -07:00
Vinnie Falco b5306a5712 String comparisons are public interfaces 2017-07-20 08:15:26 -07:00
Vinnie Falco 510092d34b Reorganize examples:
* The examples/ directory is renamed to example/

* Each program is in its own directory with its own build scripts
2017-07-20 08:15:26 -07:00
Vinnie Falco 7712ca09b2 Add string_view_body 2017-07-20 08:12:20 -07:00
Vinnie Falco a49c096042 read_size replaces read_size_helper:
* detail::read_size_helper is removed

* public function read_size helps determine the optimum
  size for calls to a DynamicBuffer's prepare function.

* special case for Asio types which don't conform to
  the concept but have their own helper function.
2017-07-20 08:12:20 -07:00
Vinnie Falco 0d70d90b75 Add string_param
fix #451
2017-07-20 08:12:19 -07:00
Vinnie Falco 5149cf8495 Add drain_buffer class
fix #457
2017-07-20 08:12:19 -07:00
Vinnie Falco 44995bf071 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco 74c26a8869 DynamicBuffer benchmarks
fix #441
2017-07-20 08:12:19 -07:00
Vinnie Falco cff5be3837 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco 67df48daa6 Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco 1c063f5bf6 Add field enumeration 2017-07-20 08:12:18 -07:00
Vinnie Falco 4b866cea36 Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco 88600beab0 Consolidate parsers to parser.hpp
fix #405
2017-07-20 08:12:18 -07:00
Vinnie Falco e5cfe9c11f Refactor treatment of status code and obsolete reason (API Change):
fix #398

A new enum status is added for the status code.

The function obsolete_reason returns default reason phrasing.

If a response has an empty reason, the serializer will
automatically insert the default reason phrase for the
status code.
2017-07-20 08:12:17 -07:00
Vinnie Falco f7211da154 Refactor treatment of request-method (API Change):
fix #397

method enum class is added to represent all known request methods.
Functions are provided to convert from strings to and from the method
enumeration.

The fields container is modified to also work with the enum.
2017-07-20 08:12:17 -07:00
Vinnie Falco 060f4a007b Refactor serialization algorithms:
serializer interface is changed to be buffer-only, no streams,
and placed in its own header file.

Operations on serializers are moved to free functions as part
of the HTTP write family of synchronous and asynchronous algorithms.
2017-07-20 08:12:17 -07:00
Vinnie Falco 75b0571e83 Refactor type_traits (API Change):
fix #373

* concepts.hpp is renamed to type_traits.hpp

* Body reader and writer concepts are renamed
2017-07-20 08:12:17 -07:00
Vinnie Falco 3664329ea7 Refactor HTTP serialization (API Change):
A new class `serializer` is introduced to permit incremental
serialization of HTTP messages. Existing free functions are
re-implemented in terms of this new class.

* The BodyReader concept is refined to support a greater variety
of strategies for providing buffers representing the body to
the serialization algorithms.

* Added buffer_body, a new model of Body which allows the caller
to provide a series of owned buffers using their own serialization
loop.

* Added empty_body, a model of Body which is for serialization only,
to represent HTTP messages with no content body.

* Removed overloads of write and async_write which send only
the HTTP header.

* Removed public interfaces for performing low-level chunk encoding.
2017-07-20 08:12:17 -07:00
Vinnie Falco 68a0f3af4f Rename prepare_buffer(s) to buffer_prefix (API Change) 2017-07-20 08:12:17 -07:00
Vinnie Falco 51f11f0902 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-07-20 08:12:16 -07:00
Vinnie Falco 043386aeb3 Move prepare_buffers to prepare_buffer.hpp (API Change)
fix #338
2017-07-20 08:12:16 -07:00
Vinnie Falco 7d8e40537a Remove placeholders (API Change) 2017-07-20 08:12:16 -07:00
Vinnie Falco f097f401cb Consolidate get_lowest_layer in type_traits.hpp
fix #347
2017-07-20 08:12:16 -07:00
Vinnie Falco 4461f5153c Tidy up HTTP reason_string (API Change):
fix #182

reason_string() is now located in <beast/http/message.hpp>
and returns a string view rather than char const*.
2017-07-20 08:12:16 -07:00
Vinnie Falco d9562ff525 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-07-20 08:12:16 -07:00
Vinnie Falco 84ece031f2 Use beast::string_view alias 2017-07-20 08:12:16 -07:00
Vinnie Falco fc0e356149 Rename to buffered_read_stream (API Change):
dynabuf_readstream is renamed to buffered_read_stream.
2017-07-20 08:12:16 -07:00
Vinnie Falco aa9f42cd06 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-07-20 08:12:16 -07:00
Vinnie Falco 6e47e9a0ac 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-07-20 08:12:16 -07:00
Vinnie Falco 24fd254690 Rename to multi_buffer, basic_multi_buffer (API Change):
These classes are renamed:

* streambuf to multi_buffer
* basic_streambuf to basic_multi_buffer
2017-07-20 08:12:16 -07:00
Vinnie Falco 38b473902a 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-07-20 08:12:16 -07:00
Vinnie Falco 3add5f293c 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-07-20 08:12:16 -07:00