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

BitCorruption on ReliableChannel #13

Open
NBG-Zorian opened this issue Jul 25, 2024 · 4 comments
Open

BitCorruption on ReliableChannel #13

NBG-Zorian opened this issue Jul 25, 2024 · 4 comments

Comments

@NBG-Zorian
Copy link

Question:
Does it handle bit corruption which happens naturally sending over the network with poor traffic on reliable channel? I cant seem to find the code which should do it.

@GlaireDaggers
Copy link
Owner

This is generally expected to be handled by the underlying communication layer, which should drop corrupt or invalid packets. For instance, Netcode.io mostly handles this by encrypting packet data - a malformed or tampered packet is likely to cause decryption to fail, and the packet will be dropped.

@gafferongames
Copy link

gafferongames commented Jul 25, 2024

Definitely yes. The packets are both encrypted and signed. Any modification to the packet whatsoever, whether malicious or due to corruption over the network will result in the signature check failing on the packet, and then the packet will be dropped. You can trust that only packets sent by you will be received on the other side, and that these packets will not be corrupted.

@NBG-Zorian
Copy link
Author

But if I am using it with different transport, not Netcode.io? Currently noticed that low level UnityTransport doesnt handle this, so was wondering if using Reliability layer on top of it will solve this?

@GlaireDaggers
Copy link
Owner

This library by itself has no mechanism for detecting corrupt packets, as it expects that to be handled by the underlying transport layer. If your transport layer does not handle that, you might consider adding your own layer on top which does (there is a spectrum of ways to do this ofc - from a basic checksum to a full encrypt+sign approach as the Netcode protocol implements).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants