Conversation
- Define PacketProcessor trait with header_size, write_outgoing, validate_incoming - Add packet_processor field to ENetHost C struct and enet_host_create - Add packet_processor to HostSettings and Host::new wiring - Initialize and cleanup correctly alongside compressor
- Add local_port field to ENetHost and enet_host_create - Add local_port() to Socket trait and UdpSocket impl - Hook validate_incoming into receive path after peer lookup - Skip processor header bytes before parsing ENet header
- Send side: write_outgoing called before ENet header, packet_size includes proc header - Receive side: skip processor bytes, validate_incoming after peer lookup - Fragment size: subtract processor header_size from mtu in enet_peer_send - Fix validate_incoming signature to use u16 matching C struct field
… params Matches the compressor pattern — avoids too_many_arguments clippy warning.
- port() returns Option<u16> -- None for unit address types - Send-side write_outgoing uses the destination peer's port (not local port) - This allows proper port-based integrity validation
…r, add regression test
…r, add regression test
- Clear proc_header_ptr after decompression so checksum uses received_data - Revert complex proc header copy in decompressed path - Add tests: compressor+checksum, compressor+processor, all-three-combo - Known: compressor+checksum+processor still fails (pre-existing checksum vs decompress ordering)
…ko-net ordering bug
…mbos - compressor+checksum passes (small packets don't compress) - compressor+processor passes - checksum+processor passes - all three: #[ignore] (pre-existing neko-net ordering: checksum modifies buffer that decompression later reads)
- Don't clear proc_header_ptr after decompression - Checksum uses [proc_header][received_data] as two buffers - Matches send-side ordering where checksum runs over uncompressed data before compression replaces the payload buffers
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.