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

Gateway v2 #204

Merged
merged 12 commits into from Aug 11, 2023
Merged

Gateway v2 #204

merged 12 commits into from Aug 11, 2023

Conversation

seailz
Copy link
Member

@seailz seailz commented Aug 8, 2023

Pull Request

  • I have checked the PRs for upcoming features/bug fixes.

Changes

  • Internal code
  • Library
  • Documentation

Closes #0

Description

v2 implementation of Discord's Gateway websocket. This attempts to minimize errors seen with the initial implementation, along with simplifying the implementation, and improving readability, performance, and making it easier to understand.

This is mostly a refactor. Most methods will stay the same and it should look pretty similar to use from outside the GatewayFactory class.

This PR also implements Exponential Backoff for reconnects to help ensure that reconnects still happen in the case of a temporary outage, issue, or downtime, etc. There's also a new Heart implementation that allows for starting, stopping, and restarting a heartbeat cycle.

Other general improvements as well, including better error handling.
Still needs proper testing (which I'm currently doing!) before merge.

@seailz seailz added type: feature Issue or PR is a feature that should be implemented priority: high High priority status: completed status: claimed Issue has a PR open for it. LARGE PR or issue with a large amount of additions IMPORTANT Important PR or issue that is important to be added/implemented soon. type: enhancement status: awaiting testing labels Aug 8, 2023
@seailz seailz added this to the discord.jar 1.0 milestone Aug 8, 2023
@seailz seailz requested a review from blueysh August 8, 2023 15:56
@seailz seailz self-assigned this Aug 8, 2023
@seailz seailz removed the request for review from blueysh August 11, 2023 10:21
@seailz seailz merged commit 7c1c91f into main Aug 11, 2023
3 checks passed
@seailz seailz deleted the feature/wsv2 branch August 11, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IMPORTANT Important PR or issue that is important to be added/implemented soon. LARGE PR or issue with a large amount of additions priority: high High priority status: claimed Issue has a PR open for it. status: completed type: enhancement type: feature Issue or PR is a feature that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant