Skip to content

feature: ping pong - #48

Merged
zhenyan121 merged 7 commits into
mainfrom
feature/ping-pong
Aug 17, 2026
Merged

feature: ping pong#48
zhenyan121 merged 7 commits into
mainfrom
feature/ping-pong

Conversation

@zhenyan121

Copy link
Copy Markdown
Member

No description provided.

Client sends periodic pings, measures round-trip time, and displays latency
in the debug overlay. Server replies with pong. Repeated missed pings
trigger a connection timeout error.
Track player UUID per session after successful login and clear it on exit. Reject login, position, chunk, block, chat, voice, entity, and logout packets when the UUID is missing or mismatched. Include sender UUID in ChatMsg so the server can verify the sender. Set client login success flag to break the exit wait on login failure.
Player exit now passes the exact player instance to removal, preventing a newly connected player with the same UUID from being incorrectly removed. The session also verifies ownership before triggering the exit.
- Force synchronous player exit on re-login to avoid stale sessions
- Use ping_time snapshot for latency and atomic reset to prevent races
- Drain all queued tasks in handle_task loop
@zhenyan121
zhenyan121 merged commit 8d07fcb into main Aug 17, 2026
2 checks passed
@zhenyan121
zhenyan121 deleted the feature/ping-pong branch August 17, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant