Commit Graph
225 Commits
Author SHA1 Message Date
Konstantin Podsvirov 56b5f8043f Clean up typo in chat websocket javascript client
It so happened that the code works, because both variables exist,
but the code was not clean.

close #1620
2019-06-01 18:15:25 +02:00
Damian Jarek d0b0ab8961 Remove redundant dependencies in http/server/fast example
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 20:18:21 +02:00
Damian Jarek 2eedbfedfc Add b2 features for compile-time options used in testing:
- `boost.beast.allow-deprecated=on` disables deprecated features.
- `boost.beast.separate-compilation=on` enables separate compilation.
- Add CI matrix items to check header-only, no-deprecated build.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 20:18:20 +02:00
Filip Matzner 1501962b92 Use steady_timer type
close #1606
2019-05-20 15:34:21 +02:00
Vinnie Falco 363d5c36d3 Don't pessimize-move 2019-05-20 15:34:21 +02:00
Konstantin Podsvirov e5bad9cbc2 Make chat websocket javascript client more user friendly
Close #1611
2019-05-19 22:32:44 +02:00
Eelis van der Weegen 9b10f08692 detect_ssl uses bool
close #1568
2019-04-15 08:21:46 -07:00
Vinnie Falco 4e90183bda Check defined(BOOST_MSVC) 2019-03-29 20:42:44 -07:00
Vinnie Falco 61fcd9ef6f Refactor Jamfiles to work with release layout 2019-03-24 09:18:02 -07:00
Vinnie Falco b38901887b cmake: Use static libs to speed up builds 2019-03-23 17:50:38 -07:00
tal 894917cb23 root_certificates.hpp: brought in the server certificate
close #1537

This allows for the self-sign ssl to work
2019-03-21 19:59:15 -07:00
Damian Jarek 222dcf7b18 Jamfile cleanup:
- Don't set the global link settings (`<link>`) to avoid dependency
ordering issues in the future.
- Allow the user to decide on the link settings for dependencies
(filesystem/coroutine).
- Make dependencies in examples explicit.
- Remove dependency of examples on Boost.Filesystem (was not used there).
- Deduplicate build settings.
- Speed up test compilation by avoiding rebuilding of main test file.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-21 17:23:49 +01:00
Damian Jarek 05f3f8a5ce Remove the need for OpenSSL in examples that don't use it
close #1524

It is now possible to compile examples without OpenSSL. Examples that
do require OpenSSL will be omitted.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-19 06:59:55 -07:00
Damian Jarek 8869ec5681 Use secure TLS/SSL versions:
TLS1.2 can be used instead, it is available in all currently
supported versions of OpenSSL.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-14 09:56:50 -07:00
Vinnie Falco 45353a7f04 handler_ptr is deprecated (API Change):
* `handler_ptr` is deprecated and should not be used.

Actions Required:

* Replace use of `handler_ptr` with `stable_async_base`
  and `allocate_stable`.
2019-03-06 10:38:08 -08:00
Vinnie Falco b51c4bb49a Tidy up examples 2019-03-06 05:40:49 -08:00
Vinnie Falco e073a9e7fc Tidy up docs 2019-03-05 20:15:07 -08:00
Vinnie Falco fca4b3ae10 make_strand is in net:: 2019-03-02 07:33:57 -08:00
Vinnie Falco 737d7a97e6 Remove session_alloc (API Change)
* session_alloc is removed, as it does not improve
  performance as intended.

Actions Required:

* Don't use session_alloc
2019-03-01 12:02:40 -08:00
Vinnie Falco 272b6f23e4 Examples use flat_buffer
fix #1488
2019-03-01 12:02:28 -08:00
Vinnie Falco bf2523b190 Tidy up an unused function 2019-03-01 11:02:52 -08:00
Vinnie Falco 8eb15148d7 Advanced servers use HTTP parser interfaces for reading 2019-02-28 10:04:52 -08:00
Vinnie Falco 16280f9991 Remove extraneous error check in advanced-server-flex
fix #1484
2019-02-28 07:54:20 -08:00
Vinnie Falco 974f34beab Tidy up a warning and test 2019-02-27 18:15:07 -08:00
Vinnie Falco 8f9eed1faf stream_base::timeout::suggested is a nested function 2019-02-27 06:52:45 -08:00
Vinnie Falco 0647c902ac role_type is in boost/beast/core/role.hpp (API Change):
This enumeration is now part of the library core and
not specific to websocket.
2019-02-26 07:20:46 -08:00
Vinnie Falco 81f33a0f89 Rename to async_base, stable_async_base 2019-02-26 07:20:08 -08:00
Vinnie Falco 5dd01155e6 Doc work 2019-02-25 08:26:42 -08:00
Vinnie Falco f92999b613 Doc work 2019-02-23 12:04:48 -08:00
Vinnie Falco 6331e03a3a OpenSSL is required for tests and examples 2019-02-23 11:15:59 -08:00
Vinnie Falco 59bda5d9c6 basic_parser is abstract, not CRTP (API Change):
* `basic_parser` now uses pure virtual member functions instead
  of the curiously recurring template pattern.

Actions Required:

* Change uses of the `basic_parser` type to omit the `Derived`
  template parameter

* Classes derived from `basic_parser` no longer need to friend
  the base.

* Virtual functions in the derived class may be marked `override`.
2019-02-23 11:15:59 -08:00
Vinnie Falco 094f5ec5cb Better treatment of SSL short reads:
fix #38

This improves the behavior when encountering a short read:

* Any stream error encountered during a read is converting into
  `http::error::partial_message` if some data was received but
  the message is incomplete.

* Examples squelch SSL short read errors from the logs.
2019-02-23 08:56:59 -08:00
Vinnie Falco 46eb006757 Tidy up docs 2019-02-22 19:46:29 -08:00
Vinnie Falco 90b783cb62 detect_ssl, async_detect_ssl are public interfaces 2019-02-22 15:39:34 -08:00
Vinnie Falco 6ada618c12 Check BOOST_NO_CXX11_THREAD_LOCAL 2019-02-21 11:09:02 -08:00
Vinnie Falco eea3929b26 Concept check tidying 2019-02-20 19:19:59 -08:00
Vinnie Falco 2b92189b65 Doc tidying 2019-02-20 19:09:21 -08:00
Vinnie Falco c3c3777661 Pass strand to async_accept 2019-02-20 15:30:03 -08:00
Vinnie Falco eaa3d5f975 Tidy up some warnings 2019-02-20 15:30:03 -08:00
Vinnie Falco c5b655c954 basic_stream connects are members 2019-02-19 16:27:27 -08:00
Vinnie Falco 6baa607295 Fixes to support Asio changes (API Change):
This adjusts Beast's interfaces and implementation to match
the changes in Boost.Asio.
2019-02-19 16:23:30 -08:00
Vinnie Falco 3f50efa138 WebSocket Decorator is a socket option (API Change):
This changes the interface used to apply a decorator to the HTTP
request or response messages used to perform the WebSocket handshake
as follows:

* Add the `stream_base::decorator` option object

* Add `stream::set_option` overload to set the decorator from
  the option

* The decorator applies to all client and server handshakes
  performed on the stream after the option is set.

* Overloads of the following functions which accept a Decorator
  are deprecated:
  - accept, accept_ex
  - handshake, handshake_ex
  - async_accept, async_accept_ex
  - async_handshake, async_handshake_ex

Actions Required:

* Code which passes decorator to any `websocket::stream` member
  function should call `stream::set_option` instead with a newly
  constructed `stream_base::decorator` object containing the
  decorator. Alternatively, the macro `BOOST_BEAST_ALLOW_DEPRECATED`
  may be defined to 1.
2019-02-19 16:23:30 -08:00
Vinnie Falco fc7b47fc5d Use suggested timeouts in Websocket examples 2019-02-18 12:18:27 -08:00
Vinnie Falco 00e8c381cd Examples use ssl_stream
fix #1455
2019-02-16 15:09:35 -08:00
Vinnie Falco 22dcb4a3cb example/cppcon2018 is removed:
* Replaced by websocket-chat-multi
2019-02-16 15:09:35 -08:00
Vinnie Falco ca1b620527 Use std::bind for control_callback 2019-02-16 15:09:34 -08:00
Vinnie Falco 2e62f25701 Use async_op_base::invoke 2019-02-16 15:09:34 -08:00
Vinnie Falco fdaf2ea7e1 Rename to async_op_base::invoke_now 2019-02-16 13:36:01 -08:00
Vinnie Falco 18447553ca Examples use bind_front_handler 2019-02-14 17:28:54 -08:00
Vinnie Falco 65cbc158cf Tidy up example docs and some names
fix #1450
2019-02-14 07:53:38 -08:00