799 Commits
Author SHA1 Message Date
Vinnie Falco b5d9ce8a27 Fix typo in test/CMakeLists.txt 2017-07-29 03:39:34 -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 e15448a83a control frame callbacks are non-const references:
fix #653

Actions Required:

* Modify calls to set the control frame callback, to
  pass non-const reference instances, and manage the
  lifetime of the instance.
2017-07-28 17:07:25 -07:00
Vinnie Falco 0dc2c9d810 Rename wstest source file 2017-07-28 17:07:24 -07:00
Vinnie Falco c367309122 Tidy up namespace qualifiers 2017-07-28 17:07:23 -07:00
Vinnie Falco 0fb562a4d7 Fix typo in equal_range
fix #688
2017-07-27 21:18:04 -07:00
Vinnie Falco cbb47a0ffd Fix websocket read of zero length message
fix #686
2017-07-27 19:09:15 -07:00
Vinnie Falco 59f7819cf6 Refactor tests Jamfile 2017-07-26 11:46:01 -07:00
Vinnie Falco 3cba28f308 variant fixes and tests 2017-07-25 15:58:07 -07:00
Vinnie Falco c831afd93b Rename to BEAST_EXPECT 2017-07-25 15:58:06 -07:00
Vinnie Falco e56d9955de websocket read returns the number of bytes inserted (API Change):
* read and async_read now return the number of bytes inserted
into the caller's buffer.

Actions Required:

* Change the signature of completion handlers used with
  websocket::stream::async_read to void(error_code, std::size_t)
2017-07-25 08:50:58 -07:00
Vinnie Falco 8578f3cf76 Update copyrights 2017-07-24 09:42:51 -07:00
Vinnie Falco 198846d7bd Update CMakeLists.txt for boost 2017-07-23 20:04:07 -07:00
Vinnie Falco b97586b318 Remove use of lexical_cast 2017-07-23 17:34:41 -07:00
Vinnie Falco 7139dd639a Boost prep 2017-07-23 17:34:13 -07:00
Vinnie Falco e5a4dc6a96 Tidy up test warning 2017-07-22 20:09:24 -07:00
Vinnie Falco cb501a07c8 WebSocket optimizations (API Change):
The websocket stream is optimized to contain a small
circular static buffer, reducing the number of I/O calls when
reading data. The size of the buffer is tuned for maximum
performance with TCP/IP and no long needs configuration:

* read_some replaces read_frame
* write_some replaces write_Frame
* async_read_some replaces async_read_frame
* async_write_some replaces async_write_frame

* websocket::stream::read_buffer_size is removed

Actions Required:

* Remove calls websocket::stream::read_buffer_size

* Use read_some and write_some instead of read_frame and write_frame
2017-07-20 08:15:32 -07:00
Vinnie Falco 4eb926cd67 bind_handler allows placeholders 2017-07-20 08:15:32 -07:00
Adrian Imboden 871ebf1c1c Fix private timer::clock_type
fix #662
2017-07-20 08:15:32 -07:00
Vinnie Falco 04887c49e0 Documentation work 2017-07-20 08:15:32 -07:00
Vinnie Falco 4e44ddbd45 Add static_buffer (API Change):
* static_buffer is added

Note this is the same name from two versions ago, when
static_buffer was renamed to flat_static_buffer for
consistency and to clear the name for a circular static
buffer.

Actions Required:

* Callers who depend on static_buffer returning sequences of
  exactly length one should switch to flat_static_buffer.
2017-07-20 08:15:32 -07:00
Vinnie Falco cb21b117bf Turn some flat_static_buffer_tests on 2017-07-20 08:15:32 -07:00
Vinnie Falco 2b89bbce41 Add wstest compression option 2017-07-20 08:15:32 -07:00
Vinnie Falco 6fa9a97727 Add flat_static_buffer::mutable_data 2017-07-20 08:15:32 -07:00
Vinnie Falco 39358a2f93 Fix extraneous argument in async_write_header
fix #655
2017-07-20 08:15:32 -07:00
Vinnie Falco bd5ab6ffd0 Add wstest benchmark tool 2017-07-20 08:15:32 -07:00
Vinnie Falco 94e92e75b7 Rename to flat_static_buffer and flat_static_buffer_base (API Change):
Actions Required:

* Rename static_buffer to flat_static_buffer_base
* Rename static_buffer_n to flat_static_buffer
2017-07-20 08:15:31 -07:00
Vinnie Falco 1d7d7445d5 Add session_alloc to example/common 2017-07-20 08:15:31 -07:00
Vinnie Falco 3c2d3181fc accept requires a message 2017-07-20 08:15:31 -07:00
Robert Allan Hennigan Leahy 27d070c724 is_invocable works with move-only types:
fix #652

Previously reported that function objects
taking move only types by value were not invocable.
2017-07-20 08:15:31 -07:00
Vinnie Falco 4b71aa67e0 Refactor chunked parsing (API Change):
* parser now has a callback feature for intercepting chunk headers
  and chunk bodies

* The names for basic_parser derived class callbacks have been
  refactored

* basic_parser offers an additional callback for distinguishing
  chunk body data.

Actions Required:

* Adjust signatures for required members of user-defined
  subclasses of basic_parser

* Use the new basic_parser chunk callbacks for accessing
  chunk extensions and chunk bodies.
2017-07-20 08:15:31 -07:00
Vinnie Falco cc73d883be File is not copy-constructible 2017-07-20 08:15:31 -07:00
Vinnie Falco 32cd5e4082 Update test zlib to 1.2.11 2017-07-20 08:15:31 -07:00
Vinnie Falco ff15cf8688 Refactor chunked-encoding serialization:
New buffer sequence classes are provided to allow full
control over the serialization of chunk-encoded message
payloads:

* chunk_header

    A ConstBufferSequence representing the chunk header.
    It includes a hexadecimal-encoded size, an optional
    set of chunk extensions, and the trailing CRLF
    required to denote the end of the chunk header.

    This allows the caller to manually serialize the chunk
    body in one or more calls to a stream output function.
    The caller must also output an object of type `chunk_crlf`
    to the stream to indicate the end of the chunk body.

* chunk_crlf

    A small ConstBufferSequence that simply represents
    the two character sequence "\r\n" (CRLF). This is needed
    for the case where the caller wants to output a chunk
    body as a series of buffers (i.e. "chunking a chunk").

* chunk_body

    A ConstBufferSequence representing a complete chunk.
    This includes the size, an optional set of chunk extensions,
    a caller provided buffer containing the body, and the
    required CRLF that follows.

* chunk_final

    A ConstBufferSequence representing a final chunk. It
    includes an optional set of caller-provided field trailers

* chunk_extensions

    A container for building a set of chunk extensions to use
    during serialization. The use of the container is optional,
    callers may provide their own buffer containing a correctly
    formatted set of chunk extensions, or they may use their
    own convenience container which meets the requirements.

The basic_fields container is modified to allow construction
outside the context of a message. The container can be used
to provide trailers to `chunk_final`.

Actions Required:

* Remove references to ChunkDecorators. Use the new chunk-encoding
  buffer sequences to manually produce a chunked payload body in
  the case where control over the chunk-extensions and/or trailers
  is required.
2017-07-20 08:15:31 -07:00
Vinnie Falco 6cec63fc9e Add basic_file_body.hpp 2017-07-20 08:15:31 -07:00
Vinnie Falco 9bfb5374f1 Shrink buffer_prefix_view 2017-07-20 08:15:30 -07:00
Vinnie Falco 9ffb8e0f0f Add basic_dynamic_body.hpp
fix #606
2017-07-20 08:15:30 -07:00
Vinnie Falco a49b442969 Add Boost.Locale utf8 benchmark comparison 2017-07-20 08:15:30 -07:00
Vinnie Falco 5788ed2574 Remove string_view_body
Actions Required:

* Use span_body<char> instead of string_view_body
2017-07-20 08:15:30 -07:00
Vinnie Falco fa45e6ad07 Tidy up FieldsReader doc 2017-07-20 08:15:30 -07:00
Vinnie Falco 6a46e48424 Add message keep_alive, chunked, content_length members 2017-07-20 08:15:30 -07:00
Vinnie Falco cc02d4a78e Tidy up invalid characters in test vector 2017-07-20 08:15:30 -07:00
Vinnie Falco f34d4f7204 span, string, vector bodies are public 2017-07-20 08:15:30 -07:00
Vinnie Falco 37110f2d04 Add span_body 2017-07-20 08:15:30 -07:00
Vinnie Falco c9908eada0 Tidy up includes and javadocs 2017-07-20 08:15:30 -07:00
Vinnie Falco 80eb5af584 Add span 2017-07-20 08:15:30 -07:00
Vinnie Falco e1de01ad13 Add vector_body
fix #580
2017-07-20 08:15:30 -07:00
Vinnie Falco c6d7fa185b Tidy up basic_string_body
fix #580
2017-07-20 08:15:30 -07:00
Vinnie Falco a00ce1209b Fix parse illegal characters in obs-fold 2017-07-20 08:15:30 -07:00