mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-31 08:39:34 +08:00
回复统一设置为TEXT类型
This commit is contained in:
parent
0c64389334
commit
40c1ea9b4c
@ -135,10 +135,12 @@ protected:
|
|||||||
_session->setOnBeforeSendCB([weakSelf](const Buffer::Ptr &buf){
|
_session->setOnBeforeSendCB([weakSelf](const Buffer::Ptr &buf){
|
||||||
auto strongSelf = weakSelf.lock();
|
auto strongSelf = weakSelf.lock();
|
||||||
if(strongSelf){
|
if(strongSelf){
|
||||||
bool mask_flag = strongSelf->_mask_flag;
|
WebSocketHeader header;
|
||||||
strongSelf->_mask_flag = false;
|
header._fin = true;
|
||||||
strongSelf->WebSocketSplitter::encode(*strongSelf,(uint8_t *)buf->data(),buf->size());
|
header._reserved = 0;
|
||||||
strongSelf->_mask_flag = mask_flag;
|
header._opcode = WebSocketHeader::TEXT;
|
||||||
|
header._mask_flag = false;
|
||||||
|
strongSelf->WebSocketSplitter::encode(header,(uint8_t *)buf->data(),buf->size());
|
||||||
}
|
}
|
||||||
return buf->size();
|
return buf->size();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user