File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,19 @@ void run(const oatpp::base::CommandLineArguments& args) {
9696 std::this_thread::sleep_for (std::chrono::milliseconds (200 ));
9797 }
9898
99+
99100 /* Once all clients are connected - start load */
101+
102+ oatpp::websocket::Config config;
103+
104+ config.maskOutgoingMessages = true ;
105+ config.readBufferSize = 64 ;
106+
100107 for (auto & socket : ClientCoroutine::SOCKETS_LIST) {
108+
109+ socket->setConfig (config);
101110 executor->execute <ClientSenderCoroutine>(socket);
111+
102112 }
103113
104114 executor->join ();
Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ class WebSocketInstanceListener : public oatpp::websocket::AsyncConnectionHandle
9696 void onAfterCreate_NonBlocking (const std::shared_ptr<AsyncWebSocket>& socket, const std::shared_ptr<const ParameterMap>& params) override {
9797 ++ SOCKETS;
9898
99+ oatpp::websocket::Config config;
100+ config.readBufferSize = 64 ;
101+
102+ socket->setConfig (config);
103+
99104 /* In this particular case we create one WebSocketListener per each connection */
100105 /* Which may be redundant in many cases */
101106 socket->setListener (std::make_shared<WebSocketListener>());
You can’t perform that action at this time.
0 commit comments