Skip to content

feat(gateway)!: turn twilight_http optional#1760

Merged
7596ff merged 4 commits intonextfrom
vilgotf/feat/gateway/optional-http
Sep 16, 2022
Merged

feat(gateway)!: turn twilight_http optional#1760
7596ff merged 4 commits intonextfrom
vilgotf/feat/gateway/optional-http

Conversation

@vilgotf
Copy link
Member

@vilgotf vilgotf commented Jun 1, 2022

Allows projects not using Discord's HTTP API to opt out of building twilight_http. Can be useful for gateway proxies.

HTTP allows the gateway to retrieve Discord's recommended shard count (exposed in the twilight_gateway::stream::start_recommended function).

The last commit in this PR (fff53e1) makes the TLS features, combined with twilight_http, no build twilight_http with the same TLS variants. This allows projects requiring WSS but not HTTPS; HTTP could in this case be proxied by, for example, twilight-http-proxy.

@github-actions github-actions bot added c-gateway Affects the gateway crate m-breaking change Breaks the public API. t-feature Addition of a new feature labels Jun 1, 2022
@vilgotf

This comment was marked as outdated.

7596ff
7596ff previously approved these changes Jun 1, 2022
@vilgotf vilgotf marked this pull request as draft June 1, 2022 17:33
@vilgotf vilgotf marked this pull request as ready for review June 3, 2022 06:12
@vilgotf vilgotf linked an issue Jun 3, 2022 that may be closed by this pull request
@vilgotf vilgotf force-pushed the vilgotf/feat/gateway/optional-http branch from 25028bf to 1b378f1 Compare June 3, 2022 09:21
@github-actions github-actions bot added the c-gateway-queue Affects the gateway queue crate label Jun 20, 2022
@vilgotf vilgotf marked this pull request as draft July 18, 2022 04:55
@vilgotf
Copy link
Member Author

vilgotf commented Jul 18, 2022

Will be rebased on #1809

@7596ff
Copy link
Contributor

7596ff commented Sep 2, 2022

Ready for rebase.

@vilgotf vilgotf force-pushed the vilgotf/feat/gateway/optional-http branch from beaeb70 to e7cdfff Compare September 3, 2022 12:42
@github-actions github-actions bot removed the c-gateway-queue Affects the gateway queue crate label Sep 3, 2022
@vilgotf vilgotf marked this pull request as ready for review September 3, 2022 12:42
Useful when the provided HTTP Client does not require TLS support, for
instance when used with a HTTP proxy.
@vilgotf vilgotf force-pushed the vilgotf/feat/gateway/optional-http branch from e7cdfff to fff53e1 Compare September 3, 2022 12:46
@vilgotf vilgotf changed the title feat(gateway)!: move http support behind twilight_http feature feat(gateway)!: turn twilight_http optional Sep 3, 2022
@7596ff 7596ff merged commit 27e1b28 into next Sep 16, 2022
@7596ff 7596ff deleted the vilgotf/feat/gateway/optional-http branch September 16, 2022 23:07
7596ff pushed a commit that referenced this pull request Nov 14, 2022
Allows projects not using Discord's HTTP API to opt out of building
`twilight_http`. Can be useful for gateway proxies.

HTTP allows the gateway to retrieve Discord's recommended shard count
(exposed in the `twilight_gateway::stream::start_recommended` function).
spring4175 pushed a commit that referenced this pull request Dec 28, 2022
Update the TLS section of the book's chapter on the gateway to state
there is no requirement on twilight-http as of PR #1760. Also corrects
`async-tungstenite` to `tokio-tungstenite` and adds a section about
Web PKI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-gateway Affects the gateway crate m-breaking change Breaks the public API. t-feature Addition of a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants