websocketpp icon indicating copy to clipboard operation
websocketpp copied to clipboard

websocketcpp 1009 收到的数据过大,ws链接断开。

Open Owenli614625 opened this issue 6 years ago • 1 comments

Owenli614625 avatar Sep 27 '20 11:09 Owenli614625

Set default maximum message size. // example set message size 50M Server-side

server echo_server;
echo_server.set_max_message_size(50 * 1024 * 1024);

Client-side

client c;
std::string uri = "ws://localhost:9002";
...
websocketpp::lib::error_code ec;
client::connection_ptr con = c.get_connection(uri, ec);
con->set_max_message_size(50 * 1024 * 1024);
c.connect(con);
...

lilucpp avatar Sep 29 '20 10:09 lilucpp