-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve player disconnection handling and packet sending effici…
…ency Enhances the networking system with better disconnection handling and packet sending optimizations: - Add `PlayerDisconnectReason` enum to provide detailed disconnect reasons like `CouldNotKeepUp` and `LostConnection` - Implement memory protection by adding `MAX_PLAYER_PENDING_MESSAGES` (1024) limit - Replace `is_flush()` string comparison with more efficient constant check using `order == u32::MAX` - Add new `DataBundle` to optimize packet sending by batching multiple packets together - Improve error handling in `egress.rs` by properly removing disconnected players when send operations fail - Replace individual packet sends with batched sends in chunk synchronization code Breaking changes: - Changed `PlayerDisconnect` to be generic over lifetime `'a` - Modified flush packet implementation in `OrderedBytes`
- Loading branch information
1 parent
0e2fd90
commit 5c8bda8
Showing
7 changed files
with
237 additions
and
135 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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.