Add optional payload length field to extras:register & general refactors - #404
Open
OptimisticDeving wants to merge 2 commits into
Open
Add optional payload length field to extras:register & general refactors#404OptimisticDeving wants to merge 2 commits into
OptimisticDeving wants to merge 2 commits into
Conversation
OptimisticDeving
marked this pull request as ready for review
August 13, 2026 00:31
OptimisticDeving
force-pushed
the
messaging-limitations
branch
from
August 13, 2026 00:45
744c43b to
e2f0d2b
Compare
amyavi
approved these changes
Aug 13, 2026
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.
I implemented an optional short in the
extras:registerpayload denoting the maximum length payload a subscriber wants to receive.As the field is optional (and its presence is inferred from the length of the
extras:registerpayload after the channel name is decoded), this PR will be backwards compatible with outdated client implementations.Additionally, as there are no checks to see if the buffer has been fully consumed, up to date client implementations will be backwards compatible with outdated server implementations.
Also, since every function in the messaging module is called on the server thread, I've removed all of the synchronization and the WeakHashMap has been replaced with an IdentityHashMap (the identity of Player does not seem to change when they are re-created on dimension change, so there should be no weirdness there.) which should hopefully increase performance a little - we don't need a WeakHashMap since we explicitly remove the player in the quit event anyways.