Commit 40c1ea9b by xiongziliang

回复统一设置为TEXT类型

parent 0c643893
......@@ -135,10 +135,12 @@ protected:
_session->setOnBeforeSendCB([weakSelf](const Buffer::Ptr &buf){
auto strongSelf = weakSelf.lock();
if(strongSelf){
bool mask_flag = strongSelf->_mask_flag;
strongSelf->_mask_flag = false;
strongSelf->WebSocketSplitter::encode(*strongSelf,(uint8_t *)buf->data(),buf->size());
strongSelf->_mask_flag = mask_flag;
WebSocketHeader header;
header._fin = true;
header._reserved = 0;
header._opcode = WebSocketHeader::TEXT;
header._mask_flag = false;
strongSelf->WebSocketSplitter::encode(header,(uint8_t *)buf->data(),buf->size());
}
return buf->size();
});
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论