-
Notifications
You must be signed in to change notification settings - Fork 7
Salvage from #18: wire and transport fixes, cursor throttling, map pings and host lobby controls #22
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
Merged
Merged
Salvage from #18: wire and transport fixes, cursor throttling, map pings and host lobby controls #22
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1606b85
Harden the wire codec, the socket framing and two entity scans
Rollocraft 9702a40
Stop sending a cursor that is not moving, and give clients a player list
Rollocraft 184b33e
Add map pings, camera navigation and host lobby controls (protocol v51)
Rollocraft a2a51cc
Say when a world sync starts, finishes, or had nobody to sync with
Rollocraft 8c364d7
Report the worst peer's jitter beside the latency spread
Rollocraft 8c2245c
Replicate transport line ticket prices (protocol v52)
Rollocraft 5795680
Validate the transit fare route number through RouteCommandCodec
Rollocraft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a client receives the first map chunk, the host-controlled
TotalBytesmay be as large as the registered 256 MiB ceiling, so this constructor immediately reserves 256 MiB even if the chunk contains only a few bytes. A malicious or malfunctioning host can repeatedly replace incomplete transfer IDs and force large allocations much faster than data arrives, potentially terminating the game with an out-of-memory failure; retain incremental growth or otherwise delay/limit allocation based on bytes actually received.Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix for Blob Preallocation (Initial Capacity Ceiling)
Capping the initial buffer allocation to 4 MiB (or
expectedBytes, whichever is smaller) prevents immediately reserving up to the 256 MiB channel ceiling on the Large Object Heap upon receiving the first chunk.This directly addresses the concern where incomplete or malicious transfers could force large allocations much faster than data actually arrives:
MemoryStreamgrows dynamically as subsequent chunks arrive, while maintaining the existing channel ceiling checks for total blob validation.(Note: Add
using System;if not already present, or useMath.Min).