Commit Graph
379 Commits
Author SHA1 Message Date
Vinnie Falco fa087e19f1 Refactor read_op + fail_op 2017-08-14 15:40:13 -07:00
Vinnie Falco ffd20b91f7 websocket test improvements 2017-08-14 15:30:29 -07:00
Vinnie Falco a56b390638 Tidy up Jamfile and tests 2017-08-10 18:32:21 -07:00
Vinnie Falco 483a4c5da5 Fix compile error in websocket snippet 2017-08-10 16:28:20 -07:00
Vinnie Falco d8a1eef7a3 Tidy up some test warnings 2017-08-09 17:23:41 -07:00
Vinnie Falco cf8182794a Boost test matrix fixes 2017-08-08 11:11:31 -07:00
Vinnie Falco dd71b0f94d Refactor all examples:
fix #575, fix #604, fix #608, fix #634, fix #712

All examples are rewritten:

* Using Best Practices
* Mostly self-contained
* New examples to complete the feature matrix
* The server-framework example is removed
2017-08-07 20:53:11 -07:00
Vinnie Falco 5e6ee5445e websocket documentation 2017-08-04 19:02:13 -07:00
Vinnie Falco 60c8a560bf Add teardown_role for correct TIME_WAIT behavior (API Change):
* teardown_tag is replaced with teardown_role, a client/server
  flag used to determine whether the shutdown is performed
  before or after reading the EOF. This is in accordance with
  RFC6455 7.1.1:

  https://tools.ietf.org/html/rfc6455#section-7.1.1

Actions Required:

* Modify signatures of teardown and async_teardown to use
  teardown_role instead of teardown_tag

* Change calls to teardown and async_teardown to pass the
  correct role: client or server depending on context.
2017-08-04 19:02:13 -07:00
Vinnie Falco de03a1a32d drain_buffer is removed (API Change):
* The drain_buffer dynamic buffer is no longer a public interface.

Actions Required:

* Replace code which uses drain_buffer. For websocket::stream,
  it is no longer necessary to manually drain the connection
  after closing.
2017-08-04 19:02:13 -07:00
Vinnie Falco 64327739f0 WebSocket close will automatically drain (API Change):
fix #642

* Calls to stream::close and stream::async_close will
  automatically perform the required read operations

Actions Required:

* Remove calling code which drains the connection after
  calling stream::close or stream::async_close
2017-08-04 19:02:13 -07:00
Vinnie Falco dc6a08d10a Add variadic min/max 2017-08-04 19:02:13 -07:00
Vinnie Falco e9d01fe79f Remove obsolete frame tests 2017-08-04 19:02:12 -07:00
Vinnie Falco 387d68f336 Reorder define test macro params 2017-08-04 19:02:12 -07:00
Vinnie Falco 2567f49fb5 Rename test macros 2017-08-04 19:02:12 -07:00
Vinnie Falco 444ef321a5 Remove unused test header 2017-08-04 19:02:07 -07:00
Vinnie Falco e5e25f5c17 Use correct handler signature in fail_op
fix #716
2017-08-03 04:21:24 -07:00
Miguel Portilla ee04fa096b Trim utf8 checker test 2017-08-01 11:56:37 -07:00
Daniel James 66b07798e6 Use unique names for Jam projects 2017-08-01 11:31:50 -07:00
Vinnie Falco 0e5117e006 Fix bench-zlib cmake 2017-08-01 06:18:13 -07:00
Vinnie Falco 7b364af6e0 Less compression on websocket test 2017-07-31 19:02:48 -07:00
Vinnie Falco 7b90ff852d Faster zlib tests 2017-07-31 19:02:48 -07:00
Vinnie Falco b0d7bc2e86 Add bench-zlib 2017-07-31 19:02:47 -07:00
Vinnie Falco 3fb5d60db2 Rename wsload compile target 2017-07-31 19:02:46 -07:00
Vinnie Falco 030f5eef87 Move extras/ to test/ 2017-07-31 19:02:46 -07:00
Vinnie Falco df9ec6c7f3 Move bench/ to test/ 2017-07-31 19:02:46 -07:00
Vinnie Falco 8def3b1ba7 Add valgrind variant, fix false positives 2017-07-31 12:37:32 -07:00
Vinnie Falco 6e3c63e685 Add test::stream 2017-07-31 09:07:21 -07:00
Vinnie Falco ea35f6f770 Ignore Content-Length in some cases:
fix #692

The value of Content-Length is not checked for limits
when the semantics of an HTTP response indicate that
the message has no body. For example, when status is 101.
2017-07-29 12:44:28 -07:00
Vinnie Falco c465ed5a69 Update repository links in source comments 2017-07-29 12:44:10 -07:00
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