mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 11:41:44 +08:00
大幅提升接收推流性能以及降低内存占用
This commit is contained in:
@@ -43,11 +43,11 @@ protected:
|
||||
/**
|
||||
* 发送前拦截并打包为websocket协议
|
||||
*/
|
||||
int send(const Buffer::Ptr &buf) override{
|
||||
int send(Buffer::Ptr buf) override{
|
||||
if(_beforeSendCB){
|
||||
return _beforeSendCB(buf);
|
||||
}
|
||||
return ClientType::send(buf);
|
||||
return ClientType::send(std::move(buf));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -287,8 +287,8 @@ protected:
|
||||
* @param ptr 数据指针
|
||||
* @param len 数据指针长度
|
||||
*/
|
||||
void onWebSocketEncodeData(const Buffer::Ptr &buffer) override{
|
||||
HttpClientImp::send(buffer);
|
||||
void onWebSocketEncodeData(Buffer::Ptr buffer) override{
|
||||
HttpClientImp::send(std::move(buffer));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user