Skip to content

Commit a5af693

Browse files
committed
Update docs to reflect close handshake support
1 parent d432e6b commit a5af693

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff 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.
128129
Thus it has to reinvent hooks for TLS and proxies and prevents support of HTTP/2.
129130

130131
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).
132135

133136
The ping API is also nicer. gorilla/websocket requires registering a pong handler on the Conn
134137
which results in awkward control flow. With nhooyr.io/websocket you use the Ping method on the Conn

0 commit comments

Comments
 (0)