适配更新zltoolkit,优化增强网络库:#2397

This commit is contained in:
xia-chu 2023-04-19 13:12:39 +08:00
parent f1438986ad
commit fcb0124f29
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit ca26e43a5f62986bb8a007226e0bad148d154abc Subproject commit dd1d308bd01a3aab038a87b938013be39134e1c1

View File

@ -71,7 +71,7 @@ void WebRtcSession::onRecv_l(const char *data, size_t len) {
if (!transport->getPoller()->isCurrentThread()) { if (!transport->getPoller()->isCurrentThread()) {
auto sock = Socket::createSocket(transport->getPoller(), false); auto sock = Socket::createSocket(transport->getPoller(), false);
//1、克隆socket(fd不变)切换poller线程到WebRtcTransport所在线程 //1、克隆socket(fd不变)切换poller线程到WebRtcTransport所在线程
sock->cloneFromPeerSocket(*(getSock())); sock->cloneSocket(*(getSock()));
auto server = _server; auto server = _server;
std::string str(data, len); std::string str(data, len);
sock->getPoller()->async([sock, server, str](){ sock->getPoller()->async([sock, server, str](){