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: expose TCP_NODELAY and TCP_KEEPALIVE #96

Merged
merged 7 commits into from
Jan 14, 2022
Merged

feat: expose TCP_NODELAY and TCP_KEEPALIVE #96

merged 7 commits into from
Jan 14, 2022

Conversation

rapiz1
Copy link
Owner

@rapiz1 rapiz1 commented Jan 12, 2022

  • Expose TCP_NODELAY
  • Opt-in for each service's data channels
  • Set for every control channel
  • Expose TCP_KEEPALIVE
  • Set default tcp_keepalive_time smaller

Resolves #79

@rapiz1 rapiz1 force-pushed the socketopt branch 4 times, most recently from dddf735 to d0b65da Compare January 12, 2022 16:07
@rapiz1
Copy link
Owner Author

rapiz1 commented Jan 12, 2022

@emillynge @juzi5201314 This PR also tweaks trait Transport, but in a mild way. And I expect it will be trivial to cooperate with. Let me know if this is troublesome for you. I will keep this PR open for a day or two and wait for your feedback.

Sorry for the inconvenience. It's hard to shoot a moving target :)

@rapiz1 rapiz1 changed the title feat: expose TCP_NODELAY feat: expose TCP_NODELAY and TCP_KEEPALIVE Jan 13, 2022
@rapiz1 rapiz1 force-pushed the socketopt branch 3 times, most recently from 8f2648a to d41ab35 Compare January 13, 2022 16:42
feat: enforce `nodelay` for every control channel
@rapiz1
Copy link
Owner Author

rapiz1 commented Jan 13, 2022

@emillynge Do you mind I merge this PR first? I think this PR provides more control over the transport parameters via Transport::hint and QUIC may benefit from it, like enabling users to set the keepalive interval. QUIC can explain hints at need.

@emillynge
Copy link

Unfortunately, I don't see it being too useful.

with quinn, settings such as keepalive_interval is set when initializing the connection (in bind and connect). Transport::hint seems to be called after this point, when it cannot be changed anyways.

@rapiz1
Copy link
Owner Author

rapiz1 commented Jan 14, 2022

In that case, quic can ignore the hint

@rapiz1 rapiz1 merged commit 0d9e5ec into main Jan 14, 2022
@rapiz1 rapiz1 deleted the socketopt branch January 14, 2022 07:45
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

Successfully merging this pull request may close these issues.

Expose TCP_NODELAY
2 participants