chenshuo / muduo

Event-driven network library for multi-threaded Linux server in C++11
https://github.com/chenshuo/muduo
Other
14.64k stars 5.14k forks source link

消除void TcpConnection::send(Buffer* buf)中buf的copy #700

Open xb1520 opened 9 months ago

xb1520 commented 9 months ago

消除void TcpConnection::send(Buffer* buf)中buf的copy

retrieveAllAsString函数会生成一个临时的string,造成内存copy,使用std::move消除内存拷贝