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

Tokio tungstenite #184

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Conversation

ekshore
Copy link
Contributor

@ekshore ekshore commented Nov 22, 2023

This is a draft PR, wanted to get your thoughts on the approach before I sunk any more time into this.

Fixed issue with get members where get members would only return one of
the server members.

Fix:
Added Query Paremeters as optionals for the API call. Optional values
defaults per [Discords
Documentation](https://discord.com/developers/docs/resources/guild#list-guild-members)
Upgraded to Rust edition 2021 in preparation to migrate to tungstinite.
Added an async version of both the `SenderExt` and `ReceieverExt`
Traits. This should allow us to have the connection contain the tokio
runtime.
I don't know that this was actually going to be that helpful, and I
think this might have been the wrong place for it regardless.
Added type aliases back but made them private.
`url` for parsing the url to send to tungstenite.
`rand` for generatting the jitter.

`simplelog` in dev dependencies to get logs when running examples
keepalive_V2 is an async version of the keepalive function meant to be
run on a tokio task / thread.
To give more seperation between async and sync code an async connection
struct has been built. The connection struct will be modified to wrap
the async connection along with a tokio runtime.
* Renamed keepalive_v2 -> keepalive_async
* Cleaned up the AsyncConnection::new function
Added presence functions to the async client
adding Resume to the async connection
Connection is now a wrapper around the AsyncConnection bundling the
async connection with the tokio runtime.
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