Skip to content

Commit db37185

Browse files
committed
Fixes for release
Closes #69
1 parent 751a0ed commit db37185

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ If you have any feedback, please feel free to open an issue.
1414
## Install
1515

1616
```bash
17-
go get nhooyr.io/websocket
17+
go get nhooyr.io/websocket@0.2.0
1818
```
1919

2020
## Features
@@ -85,9 +85,8 @@ c.Close(websocket.StatusNormalClosure, "")
8585
- Minimal API is easier to maintain and learn
8686
- Context based cancellation is more ergonomic and robust than setting deadlines
8787
- No ping support because TCP keep alives work fine for HTTP/1.1 and they do not make
88-
sense with HTTP/2 (see #1)
89-
- net.Conn is never exposed as WebSocket's over HTTP/2 will not have a net.Conn.
90-
- Structures are nicer than functional options, see [google/go-cloud#908](https://github.com/google/go-cloud/issues/908#issuecomment-445034143)
88+
sense with HTTP/2 (see [#1](https://github.com/nhooyr/websocket/issues/1))
89+
- net.Conn is never exposed as WebSocket over HTTP/2 will not have a net.Conn.
9190
- Using net/http's Client for dialing means we do not have to reinvent dialing hooks
9291
and configurations like other WebSocket libraries
9392

@@ -105,7 +104,7 @@ in production.
105104
https://github.com/gorilla/websocket
106105

107106
This package is the community standard but it is 6 years old and over time
108-
has accumulated cruft. There are many ways to do the same thing, usage is not clear
107+
has accumulated cruft. Using is not clear as there are many ways to do things
109108
and there are some rough edges. Just compare the godoc of
110109
[nhooyr/websocket](https://godoc.org/github.com/nhooyr/websocket) side by side with
111110
[gorilla/websocket](https://godoc.org/github.com/gorilla/websocket).
@@ -115,11 +114,10 @@ which makes it easy to use correctly.
115114

116115
Furthermore, nhooyr/websocket has support for newer Go idioms such as context.Context and
117116
also uses net/http's Client and ResponseWriter directly for WebSocket handshakes.
118-
gorilla/websocket writes its handshakes directly to a net.Conn which means
117+
gorilla/websocket writes its handshakes to the underlying net.Conn which means
119118
it has to reinvent hooks for TLS and proxying and prevents support of HTTP/2.
120119

121-
Another advantage of nhooyr/websocket is that it supports multiple concurrent writers out
122-
of the box.
120+
Another advantage of nhooyr/websocket is that it supports concurrent writers out of the box.
123121

124122
### x/net/websocket
125123

@@ -138,8 +136,9 @@ and clarity.
138136

139137
This library is fantastic in terms of performance. The author put in significant
140138
effort to ensure its speed and I have applied as many of its optimizations as
141-
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.
139+
I could into nhooyr/websocket. Definitely check out his fantastic [blog post](https://medium.freecodecamp.org/million-websockets-and-go-cc58418460bb)
140+
about performant WebSocket servers.
142141

143142
If you want a library that gives you absolute control over everything, this is the library,
144-
but for most users, the API provided by nhooyr/websocket will fit better as it is just as
145-
performant but much easier to use correctly and idiomatic.
143+
but for most users, the API provided by nhooyr/websocket will fit better as it is nearly just
144+
as performant but much easier to use correctly and idiomatic.

0 commit comments

Comments
 (0)