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

v3: Move away from gorilla/websocket #360

Open
diamondburned opened this issue Dec 10, 2022 · 2 comments
Open

v3: Move away from gorilla/websocket #360

diamondburned opened this issue Dec 10, 2022 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@diamondburned
Copy link
Owner

As of the time writing this issue, gorilla/websocket is now officially archived and will no longer receive any updates. Although we don't try to update dependencies very often, we still want to use a reasonably maintained library.

A few alternatives exist, none of which I actually want to use:

Any other alternatives proposed are welcome; please put them as comments under this issue. For now, we'll stick to using gorilla/websocket.

@diamondburned diamondburned pinned this issue Dec 10, 2022
@diamondburned diamondburned added enhancement New feature or request help wanted Extra attention is needed labels Dec 10, 2022
@lemondevxyz
Copy link

I'd vouch for gobwas/ws because it is well maintained from what I could tell. That and the author of the library works at Mail.ru which means maintenance is guaranteed(They serve over 3 million users simultaneously).

I also have used the library myself and find the library pleasant. While gobwas/ws is very low level, gobwas/ws/wsutil is used for high level operations.

gobwas/ws/wsutil makes things very easy because it uses interfaces like io.Writer and io.Reader.

To help you get familiar with gobwas/ws/wsutil, here are the methods you'd use in diamondburned/arikawa/v3/utils/ws/conn.go:

Do note: WriteServerMessage is meant to be used by clients. The naming scheme comes from where the message is supposed to written to.

There are other facets to wsutil that I haven't covered but I don't think that'll be necessary since both gorilla/websocket and gobwas/ws share net.Conn which should cover all your needs.

@ayn2op
Copy link
Contributor

ayn2op commented Sep 19, 2024

The Gorilla toolkit has new maintainers; this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants