File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ production.
105
105
https://github.com/gorilla/websocket
106
106
107
107
This package is the community standard but it is 6 years old and over time
108
- has accumulated cruft. Using is not clear as there are many ways to do things
109
- and there are some rough edges. Just compare the godoc of
108
+ has accumulated cruft. There are too many ways to do the same thing.
109
+ Just compare the godoc of
110
110
[ nhooyr/websocket] ( https://godoc.org/github.com/nhooyr/websocket ) side by side with
111
111
[ gorilla/websocket] ( https://godoc.org/github.com/gorilla/websocket ) .
112
112
@@ -122,10 +122,10 @@ Pure conjecture but I would argue that the sprawling API has made it difficult t
122
122
Moreover, nhooyr/websocket has support for newer Go idioms such as context.Context and
123
123
also uses net/http's Client and ResponseWriter directly for WebSocket handshakes.
124
124
gorilla/websocket writes its handshakes to the underlying net.Conn which means
125
- it has to reinvent hooks for TLS and proxying and prevents support of HTTP/2.
125
+ it has to reinvent hooks for TLS and proxies and prevents support of HTTP/2.
126
126
127
127
Some more advantages of nhooyr/websocket are that it supports concurrent writes and makes it
128
- very easy to close the connection with a status code and reason compared to gorilla/websocket .
128
+ very easy to close the connection with a status code and reason.
129
129
130
130
In terms of performance, there is no significant difference between the two. Will update
131
131
with benchmarks soon ([ #75 ] ( https://github.com/nhooyr/websocket/issues/75 ) ).
You can’t perform that action at this time.
0 commit comments