mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 12:05:58 +08:00
大幅提升接收推流性能以及降低内存占用
This commit is contained in:
@@ -53,11 +53,11 @@ protected:
|
||||
* @param buf 需要截取的数据
|
||||
* @return 数据字节数
|
||||
*/
|
||||
int send(const Buffer::Ptr &buf) override {
|
||||
int send(Buffer::Ptr buf) override {
|
||||
if (_beforeSendCB) {
|
||||
return _beforeSendCB(buf);
|
||||
}
|
||||
return TcpSessionType::send(buf);
|
||||
return TcpSessionType::send(std::move(buf));
|
||||
}
|
||||
|
||||
string getIdentifier() const override {
|
||||
@@ -219,8 +219,8 @@ protected:
|
||||
/**
|
||||
* 发送数据进行websocket协议打包后回调
|
||||
*/
|
||||
void onWebSocketEncodeData(const Buffer::Ptr &buffer) override{
|
||||
HttpSessionType::send(buffer);
|
||||
void onWebSocketEncodeData(Buffer::Ptr buffer) override{
|
||||
HttpSessionType::send(std::move(buffer));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user