@@ -115,11 +114,10 @@ which makes it easy to use correctly.
Furthermore, nhooyr/websocket has support for newer Go idioms such as context.Context and
also uses net/http's Client and ResponseWriter directly for WebSocket handshakes.
gorilla/websocket writes its handshakes directly to a net.Conn which means
gorilla/websocket writes its handshakes to the underlying net.Conn which means
it has to reinvent hooks for TLS and proxying and prevents support of HTTP/2.
Another advantage of nhooyr/websocket is that it supports multiple concurrent writers out
of the box.
Another advantage of nhooyr/websocket is that it supports concurrent writers out of the box.
### x/net/websocket
...
...
@@ -138,8 +136,9 @@ and clarity.
This library is fantastic in terms of performance. The author put in significant
effort to ensure its speed and I have applied as many of its optimizations as
I could into nhooyr/websocket. Definitely check out his fantastic [blog post](https://medium.freecodecamp.org/million-websockets-and-go-cc58418460bb) about performant WebSocket servers.
I could into nhooyr/websocket. Definitely check out his fantastic [blog post](https://medium.freecodecamp.org/million-websockets-and-go-cc58418460bb)
about performant WebSocket servers.
If you want a library that gives you absolute control over everything, this is the library,
but for most users, the API provided by nhooyr/websocket will fit better as it is just as
performant but much easier to use correctly and idiomatic.
but for most users, the API provided by nhooyr/websocket will fit better as it is nearly just
as performant but much easier to use correctly and idiomatic.