Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use connection state to optimise packet type detection #38

Merged
merged 3 commits into from
Aug 14, 2023

Conversation

zefir-git
Copy link
Member

@zefir-git zefir-git commented Aug 12, 2023

Minecraft likes to re-use packet IDs. This PR first checks if the packet type's expected connection state matches the actual state of the connection sending the packet. If there is no match, we can quickly skip this type and continue checking another.

@zefir-git zefir-git added the enhancement New feature or request label Aug 12, 2023
@zefir-git zefir-git self-assigned this Aug 12, 2023
@zefir-git zefir-git linked an issue Aug 12, 2023 that may be closed by this pull request
@zefir-git zefir-git force-pushed the 37-feature-improved-packet-detection-based-on-state branch from de50d07 to f3b2f1c Compare August 12, 2023 09:47
kai-gitt
kai-gitt previously approved these changes Aug 14, 2023
@zefir-git zefir-git merged commit 5154312 into main Aug 14, 2023
4 checks passed
@zefir-git zefir-git deleted the 37-feature-improved-packet-detection-based-on-state branch August 14, 2023 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: improved packet detection based on state
2 participants