Skip to content

Commit

Permalink
Merge branch 'release/v1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
i-vovk committed Nov 24, 2021
2 parents c9f3cbb + 7c0bee4 commit bdb48b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
## 1.2.0 (2021-11-24)

### Features

* http/base_socket: Use dynamic allocator for transfered data


## 1.1.14 (2021-11-23)

### Bug Fixes

* connection_pool: Fix wrong error message "Too many open descriptors"


## 1.1.13 (2021-11-17)

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)

set(STREAMCLIENT_VERSION_MAJOR "1")
set(STREAMCLIENT_VERSION_MINOR "1")
set(STREAMCLIENT_VERSION_RELEASE "14")
set(STREAMCLIENT_VERSION_MINOR "2")
set(STREAMCLIENT_VERSION_RELEASE "0")
set(STREAMCLIENT_SUMMARY "C++ library")
set(STREAMCLIENT_REPOSITORY_URL "https://github.com/TinkoffCreditSystems/stream-client")
set(STREAMCLIENT_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
Expand Down
8 changes: 3 additions & 5 deletions include/stream-client/stream/http_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace http {
* @note Not thread-safe, multi-thread rw access may mess up your data stream
* and/or timeout handling.
*
* @tparam Stream Type od underlying stream to use.
* @tparam Stream Type of underlying stream to use.
*/
template <typename Stream>
class base_socket
Expand All @@ -36,7 +36,7 @@ class base_socket
/// Body length limit for internal parser
static const size_t kBodyLimit;

using allocator_type = ::stream_client::stream::detail::static_allocator<char>;
using allocator_type = std::allocator<char>;
using next_layer_type = typename std::remove_reference<Stream>::type;
using protocol_type = typename next_layer_type::protocol_type;
using endpoint_type = typename next_layer_type::endpoint_type;
Expand All @@ -62,8 +62,7 @@ class base_socket
!std::is_same<typename std::decay<Arg1>::type, base_socket<Stream>>::value>::type>
base_socket(Arg1&& arg1, ArgN&&... argn)
: stream_(std::forward<Arg1>(arg1), std::forward<ArgN>(argn)...)
, buffer_allocator_(kBodyLimit + kHeaderLimit)
, buffer_(kBodyLimit + kHeaderLimit, buffer_allocator_)
, buffer_(kBodyLimit + kHeaderLimit)
{
}

Expand Down Expand Up @@ -246,7 +245,6 @@ class base_socket

private:
Stream stream_; ///< Stream to perform rw access.
allocator_type buffer_allocator_; ///< Allocator used for incoming data.
boost::beast::basic_flat_buffer<allocator_type> buffer_; ///< Buffer to store incoming data.
};

Expand Down

0 comments on commit bdb48b9

Please sign in to comment.