allow to set buffer size for server

This commit is contained in:
Chunting Gu
2020-12-21 17:53:36 +08:00
parent ca83869912
commit c2f3a87cd2
7 changed files with 26 additions and 12 deletions
+3 -2
View File
@@ -12,9 +12,10 @@ using boost::asio::ip::tcp;
namespace webcc {
Connection::Connection(tcp::socket socket, ConnectionPool* pool,
Queue<ConnectionPtr>* queue, ViewMatcher&& view_matcher)
Queue<ConnectionPtr>* queue, ViewMatcher&& view_matcher,
std::size_t buffer_size)
: socket_(std::move(socket)), pool_(pool), queue_(queue),
view_matcher_(std::move(view_matcher)), buffer_(kBufferSize) {
view_matcher_(std::move(view_matcher)), buffer_(buffer_size) {
}
void Connection::Start() {