@@ -322,6 +322,7 @@ void multithreadtest()
322322 std::this_thread::sleep_for (200ms);
323323 }
324324}
325+ const auto bufferesize = 1024 * 1024 * 10 ;
325326void multithreadthroughputtest ()
326327{
327328 std::cout << " Starting Multi threaded throughput test" << std::endl;
@@ -331,7 +332,6 @@ void multithreadthroughputtest()
331332 auto lastheard = std::chrono::high_resolution_clock::now ();
332333 std::atomic<unsigned long long > mbsreceived;
333334 mbsreceived = 0 ;
334- const auto bufferesize = 1024 * 1024 * 10 ;
335335
336336 SL::WS_LITE::PortNumber port (3004 );
337337 auto listenerctx =
@@ -364,8 +364,8 @@ void multithreadthroughputtest()
364364 auto c =
365365 clientctx->NoTLS ()
366366 ->CreateClient ()
367- ->onConnection ([&clients, &lastheard, i, &mbssent, &sendtimer, bufferesize](
368- const std::shared_ptr<SL::WS_LITE::IWSocket> &socket, const std::unordered_map<std::string, std::string> &header) {
367+ ->onConnection ([&clients, &lastheard, &mbssent, &sendtimer]( const std::shared_ptr<SL::WS_LITE::IWSocket> &socket,
368+ const std::unordered_map<std::string, std::string> &header) {
369369 lastheard = std::chrono::high_resolution_clock::now ();
370370 SL::WS_LITE::WSMessage msg;
371371 msg.Buffer = std::shared_ptr<unsigned char >(new unsigned char [bufferesize], [&](unsigned char *p) {
0 commit comments