Commit Graph
1121 Commits
Author SHA1 Message Date
Vinnie Falco c3fd6f9087 Tidy up formal parameter names
fix #361
2017-05-14 15:00:51 -07:00
Vinnie Falco 210cd707dd Remove coveralls integration 2017-05-14 15:00:50 -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 c59b5440f0 Trim Appveyor matrix rows 2017-05-10 10:06:09 -07:00
Vinnie Falco b7184f3a69 Return http::error::end_of_stream on HTTP read eof (API Change)
fix #350
2017-05-10 10:03:51 -07:00
Vinnie Falco f2d825594e Set version to 40 2017-05-10 09:17:54 -07:00
Vinnie Falco 40b919449f Tidy up .travis.yml:
* Combine address and undefined sanitizers
* Additional targets for older gcc and 32 bit
2017-05-10 09:17:37 -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 f88813620c Set version to 39 2017-05-09 18:27:24 -07:00
Vinnie Falco 47c82b5cbc Better travis deps 2017-05-09 18:27:21 -07:00
Vinnie Falco 4ed7865798 Squelch openssl spurious leak and memory errors 2017-05-09 18:27:21 -07:00
Vinnie Falco b6bc26f34c Fixed braced-init error with older gcc 2017-05-09 07:23:10 -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 5631936106 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-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 728e9d8e70 Tidy up basic_parser javadocs 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 771c5cade5 Doc fixes and tidying 2017-05-09 07:23:08 -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 87fd60c151 Fix eof error on ssl::stream shutdown
fix #334
2017-05-07 13:40:04 -07:00
Vinnie Falco 606fc9d6a3 Add websocket async echo ssl server test:
This adds a new asynchronous websocket echo server
which supports TLS/SSL connections.
2017-05-07 13:40:04 -07:00
Vinnie Falco ff5e659545 Refactor http::header contents (API Change):
fix #124

The http::header data members "method", "url", and "reason"
are changed from data members, to pairs of get and set
functions which forward the call to the Fields type used
to instantiate the template.

Previously, these data members were implemented using
std::string. With this change, the implementation of the
Fields type used to instantiate the template is now in
control of the representation of those values. This permits
custom memory allocation strategies including uniform use of
the Allocator type already provided to beast::http::basic_fields.
2017-05-07 13:40:04 -07:00
Vinnie Falco dd02097d26 Set version to 1.0.0-b38 2017-05-07 13:39:44 -07:00
Vinnie Falco 5596e97656 Prevent basic_fields operator[] assignment
fix #258
2017-05-07 13:39:41 -07:00
Vinnie Falco c2b32dc740 Remove websocket::keep_alive option (API Change):
fix #332

This removes the keep_alive option from the WebSocket stream.
Callers who wish to control the behavior of the Connection
header may do so in the decorator and completion handlers
for the handshake and accept functions.
2017-05-07 13:39:40 -07:00
Vinnie Falco 32dbfb283b Refactor WebSocket error codes (API Change):
fix #325

This removes unused and misleading handshake error codes.
All semantic handshake failures are now reported using
the same code, error::handshake_failed. Errors originating
from stream operations still use the underlying stream
error codes (for example: boost::asio::error::connection_reset).
2017-05-07 13:39:40 -07:00
Vinnie Falco dd6b5004ac WebSocket doc work 2017-05-07 13:39:40 -07:00
Vinnie Falco 0b4d87ccf9 More flat_streambuf tests 2017-05-07 13:39:40 -07:00
Vinnie Falco aacefb4c84 Add test_allocator to extras/test 2017-05-07 13:39:40 -07:00
Vinnie Falco 931a5fb805 Simplify get_lowest_layer test 2017-05-07 13:39:40 -07:00
Vinnie Falco ba4228a832 Use static_string for WebSocket handshakes:
fix #328

This replaces usages of std::string with
static_string when performing WebSocket handshakes.
2017-05-07 13:39:40 -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
Vinnie Falco 30e8d160a0 Set version to 1.0.0-b37 2017-05-07 13:20:18 -07:00
Vinnie Falco b14102092d Fix narrowing warning in table constants
fix #344
2017-05-07 13:18:41 -07:00
Vinnie Falco d554b81b06 Add -funsigned-char to asan build target 2017-05-07 11:13:51 -07:00
Vinnie Falco bcc6ad8e5e Add ub sanitizer blacklist 2017-05-07 09:33:52 -07:00
Vinnie Falco e1f08e9aa1 Fix flat_streambuf:
Don't call memcpy or memmove with null arguments.
2017-05-07 07:20:13 -07:00
Brad Anderson 7d08f59fa6 Fix typo in documentation example 2017-05-05 21:00:56 -07:00