This commit is contained in:
aozhiwei 2023-11-24 22:14:42 +08:00
parent bbc15afd7e
commit 81816d91be

View File

@ -45,7 +45,6 @@ void Player::Init(int idx,
f8::UdpLog::Instance()->Warning
("WebSocketClient on_disconnect", {});
};
#if 0
web_socket_->on_decode_userpacket =
[this, socket_handle = GetSocketId()]
(char* buf, int& offset, unsigned int buflen)
@ -57,15 +56,16 @@ void Player::Init(int idx,
if (buflen - offset < sizeof(f8::PackHead) + p->packlen) {
break;
}
App::Instance()->AddSocketMsg
(SF_GameServer,
f8::App::Instance()->AddSocketMsg
(0,//SF_GameServer,
socket_handle,
//p->ip_saddr,
0,
p->msgid,
p->seqid,
&buf[offset + sizeof(f8::PackHead)],
p->packlen);
p->packlen,
0);
offset += sizeof(f8::PackHead) + p->packlen;
} else {
warning = true;
@ -78,7 +78,6 @@ void Player::Init(int idx,
f8::UdpLog::Instance()->Warning("收到client非法数据包", {});
}
};
#endif
f8::CoMgr::Instance()->CreateCo
(
[this] (f8::Coroutine* co)