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

Does Hazel support TCP? #59

Open
Lisk90 opened this issue Aug 31, 2023 · 1 comment
Open

Does Hazel support TCP? #59

Lisk90 opened this issue Aug 31, 2023 · 1 comment

Comments

@Lisk90
Copy link

Lisk90 commented Aug 31, 2023

I see in the included .docx (Hazel Networking Protocol.docx in the root) that there is a TCP implementation:
https://i.imgur.com/b8rYxsN.png

However, this isn't listed in the features list on the main repo page.

Wondering if TCP is supported? And if not, what should I be aware of when working with RUDP, as someone with a TCP background?

@willardf
Copy link
Owner

Hello! TCP is not supported. In the old days, the previous maintainer supported it, but I wanted to descope it to a "highest performance self", which TCP doesn't accomplish because TCP implements reliability features with different goals in mind.

When working with RUDP, the biggest things to keep in mind is:

  • You can pick between RUDP and plain UDP. With TCP all data is 100% reliable always. But sometimes you should prefer responsiveness over reliability. You can save bandwidth and improve responsiveness by sending frequent updates unreliably.
  • Hazel specifically does not support packet fragmentation, so you have to worry about the Maximum Transmission Unit size. MTU varies from 560 to 1500 bytes, but leans towards the latter value for modern internet. IMO 1200 is a good value. If you try to send more bytes than the MTU, you may get dropped packets which can lead to missing data (unreliable) or disconnects (reliable).

That's more or less it. RUDP seeks to recreate TCP features in a more flexible/optional manner. So you should feel at home with it's connection-based interface and when sending reliable messages.

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

2 participants