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

Ping-related improvements #185

Merged
merged 4 commits into from
Aug 10, 2023
Merged

Ping-related improvements #185

merged 4 commits into from
Aug 10, 2023

Conversation

palkan
Copy link
Member

@palkan palkan commented Aug 9, 2023

What is the purpose of this pull request?

This PRs combines several improvements regarding server-client pings and session configuration.

What changes did you make? (overview)

  • Added ability to configure ping interval and precision per client.
  • Refactor setting protocol-specific session options
    • Do not store sessions not using the extended protocol in cache
    • Move previous session ID extraction from session.go to session_options.go (session shouldn't care about where the ID is coming from)
    • Extract protocol-specific session configuration (that would allow re-using the same endpoint for different protocols based on sub-protocol)
  • Add small jitter to pings (so they're not happening simultaneously when tons of clients connecting at the same time)
  • Add pong-s support (when the extended protocol is used)

Is there anything you'd like reviewers to focus on?

Checklist

  • I've added tests for this change
  • I've added a Changelog entry
  • I've updated documentation

@palkan palkan marked this pull request as ready for review August 10, 2023 03:12
@palkan palkan merged commit 983746f into master Aug 10, 2023
18 checks passed
@palkan palkan deleted the feat/pongs branch August 10, 2023 23:52
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.

1 participant