提交 460f2e87 编写于 作者: E eidheim

Removed unnecessary shared_ptr copies in echo_all examples

上级 62d9175d
......@@ -96,7 +96,7 @@ int main() {
auto message_str=message->string();
//echo_all.get_connections() can also be used to solely receive connections on this endpoint
for(auto a_connection: server.get_connections()) {
for(auto &a_connection: server.get_connections()) {
auto send_stream=make_shared<WsServer::SendStream>();
*send_stream << message_str;
......
......@@ -96,7 +96,7 @@ int main() {
auto message_str=message->string();
//echo_all.get_connections() can also be used to solely receive connections on this endpoint
for(auto a_connection: server.get_connections()) {
for(auto &a_connection: server.get_connections()) {
auto send_stream=make_shared<WssServer::SendStream>();
*send_stream << message_str;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册