Skip to content

Commit

Permalink
README.md: Mention gorilla advantage re no extra context cancellation…
Browse files Browse the repository at this point in the history
… goroutine

Not sure how/when this was lost but an important disadvantage to note.
  • Loading branch information
nhooyr committed Oct 25, 2023
1 parent 454aee8 commit 8060f3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Advantages of [gorilla/websocket](https://github.com/gorilla/websocket):
- Mature and widely used
- [Prepared writes](https://pkg.go.dev/github.com/gorilla/websocket#PreparedMessage)
- Configurable [buffer sizes](https://pkg.go.dev/github.com/gorilla/websocket#hdr-Buffers)
- No extra goroutine per connection to support cancellation with context.Context. This costs nhooyr.io/websocket 2 KB of memory per connection.
- Will be removed soon with [context.AfterFunc](https://github.com/golang/go/issues/57928). See [#411](https://github.com/nhooyr/websocket/issues/411)

Advantages of nhooyr.io/websocket:

Expand Down

0 comments on commit 8060f3a

Please sign in to comment.