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

feat: KCP transport now has CRC64 validation #397

Merged
merged 1 commit into from
Oct 15, 2020
Merged

feat: KCP transport now has CRC64 validation #397

merged 1 commit into from
Oct 15, 2020

Conversation

paulpach
Copy link
Contributor

Every message now is verified with a CRC64 checksum.
This makes it practically immune to corruption.

Note that UDP has a CRC16 built-in, which does make it possible for corruption to go undetected.

The performance impact seems completely negligible.

@sonarcloud
Copy link

sonarcloud bot commented Oct 15, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

97.9% 97.9% Coverage
0.0% 0.0% Duplication

@Lymdun
Copy link
Member

Lymdun commented Oct 15, 2020

Sounds good.

Note that you can completely disable the built-in CRC with socket.SetSocketOption(SocketOptionLevel.Udp, SocketOptionName.NoChecksum, true);

@paulpach paulpach merged commit 21c8649 into master Oct 15, 2020
@paulpach paulpach deleted the crc branch October 15, 2020 19:08
github-actions bot pushed a commit that referenced this pull request Oct 15, 2020
# [49.3.0](v49.2.0...v49.3.0) (2020-10-15)

### Bug Fixes

* double counting packets on kcp receive ([89cb937](89cb937))
* NRE when disconnecting with no owned objects ([4e7983e](4e7983e))

### Features

* KCP transport now has CRC64 validation ([#397](#397)) ([21c8649](21c8649))

### Performance Improvements

* recycle segments ([13a3c3d](13a3c3d))
* reduce allocation sending to observers ([f5f7f6c](f5f7f6c))
* reduce allocations per client ([8d37f8c](8d37f8c))
* Refactore move to receive queue ([173735c](173735c))
* remove allocation ([9311fbd](9311fbd))
* reuse segment if it is a repeat ([4879010](4879010))
* Use allocation free completion source ([20227a7](20227a7))
* use Unitask ([384d02b](384d02b))
* Use UniTask instead of task ([70c9cfb](70c9cfb))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 49.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants