feature: ping pong - #48
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.