File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ go get nhooyr.io/websocket
24
24
- Highly optimized by default
25
25
- Concurrent writes out of the box
26
26
- [ Complete Wasm] ( https://godoc.org/nhooyr.io/websocket#hdr-Wasm ) support
27
+ - [ WebSocket close handshake] ( https://godoc.org/nhooyr.io/websocket#Conn.Close )
27
28
28
29
## Roadmap
29
30
@@ -128,7 +129,9 @@ gorilla/websocket writes its handshakes to the underlying net.Conn.
128
129
Thus it has to reinvent hooks for TLS and proxies and prevents support of HTTP/2.
129
130
130
131
Some more advantages of nhooyr.io/websocket are that it supports concurrent writes and
131
- makes it very easy to close the connection with a status code and reason.
132
+ makes it very easy to close the connection with a status code and reason. In fact,
133
+ nhooyr.io/websocket even implements the complete WebSocket close handshake for you whereas
134
+ with gorilla/websocket you have to perform it manually. See [ gorilla/websocket #448 ] ( https://github.com/gorilla/websocket/issues/448 ) .
132
135
133
136
The ping API is also nicer. gorilla/websocket requires registering a pong handler on the Conn
134
137
which results in awkward control flow. With nhooyr.io/websocket you use the Ping method on the Conn
You can’t perform that action at this time.
0 commit comments