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

Connection/Client rework #9

Merged
merged 12 commits into from
May 30, 2020
Merged

Connection/Client rework #9

merged 12 commits into from
May 30, 2020

Conversation

stkfd
Copy link
Owner

@stkfd stkfd commented Jan 19, 2020

This reworks the way connections and clients are handled. Currently still a rough work in progress, at the end there should be three public ways to connect to chat through this library:

  1. Only create a connection with no extra logic like rate limit detection, auto-reconnects, middleware etc. Pretty much just IRC + Twitch extensions parsing around a websocket connection
  2. Creating a client which internally handles a single connection, but comes "batteries included", so it handles rate limit detection, reconnect requests from twitch, detects broken network connections (indicated by IO errors or by getting no response to ping messages to Twitch) and handles other typical requirements. The client keeps track of which channels it should be in and on reconnect automatically rejoins. This is probably the most common use case.
  3. A connection pool, very similar to the above client but with multiple connections. The public interface would probably set a threshold of maximum channels per connection, and the pool internally adds or removes connections as required.

Once finished this will address #6 and #7.

@stkfd stkfd changed the base branch from master to feature/rate-limits January 20, 2020 00:43
@stkfd stkfd changed the base branch from feature/rate-limits to master January 20, 2020 00:43
@stkfd stkfd mentioned this pull request Jan 20, 2020
@stkfd stkfd merged commit fa1b484 into master May 30, 2020
@stkfd stkfd deleted the feature/resilient-connections branch May 30, 2020 00:06
@stkfd stkfd changed the title WIP: Connection/Client rework Connection/Client rework May 30, 2020
@stkfd stkfd restored the feature/resilient-connections branch June 19, 2020 09:31
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.

None yet

1 participant