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
This commit is contained in:
Vinnie Falco
2017-07-20 08:15:32 -07:00
parent 28b5275c73
commit cb501a07c8
21 changed files with 2350 additions and 1241 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ private:
{
std::geometric_distribution<std::size_t> dist{
double(4) / boost::asio::buffer_size(tb_)};
ws_.async_write_frame(true,
ws_.async_write_some(true,
beast::buffer_prefix(dist(rng_), tb_),
alloc_.wrap(std::bind(
&connection::on_write,