File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 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
2424- Highly optimized by default
2525- Concurrent writes out of the box
2626- [ Complete Wasm] ( https://godoc.org/nhooyr.io/websocket#hdr-Wasm ) support
27+ - [ WebSocket close handshake] ( https://godoc.org/nhooyr.io/websocket#Conn.Close )
2728
2829## Roadmap
2930
@@ -128,7 +129,9 @@ gorilla/websocket writes its handshakes to the underlying net.Conn.
128129Thus it has to reinvent hooks for TLS and proxies and prevents support of HTTP/2.
129130
130131Some 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 ) .
132135
133136The ping API is also nicer. gorilla/websocket requires registering a pong handler on the Conn
134137which 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