reduce network latency

This commit is contained in:
weihuoya 2021-07-04 23:06:13 +08:00
parent b7f0e886d9
commit adac0d193b
2 changed files with 11 additions and 9 deletions

View file

@ -251,7 +251,7 @@ public:
void Room::RoomImpl::ServerLoop() {
while (state != State::Closed) {
ENetEvent event;
if (enet_host_service(server, &event, 50) > 0) {
if (enet_host_service(server, &event, 16) > 0) {
switch (event.type) {
case ENET_EVENT_TYPE_RECEIVE:
switch (event.packet->data[0]) {