diff --git a/README.md b/README.md index 6e986897..1b10c125 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,15 @@ go get github.com/coder/websocket See GitHub issues for minor issues but the major future enhancements are: -- [ ] Perfect examples [#217](https://github.com/nhooyr/websocket/issues/217) -- [ ] wstest.Pipe for in memory testing [#340](https://github.com/nhooyr/websocket/issues/340) -- [ ] Ping pong heartbeat helper [#267](https://github.com/nhooyr/websocket/issues/267) -- [ ] Ping pong instrumentation callbacks [#246](https://github.com/nhooyr/websocket/issues/246) -- [ ] Graceful shutdown helpers [#209](https://github.com/nhooyr/websocket/issues/209) -- [ ] Assembly for WebSocket masking [#16](https://github.com/nhooyr/websocket/issues/16) - - WIP at [#326](https://github.com/nhooyr/websocket/pull/326), about 3x faster -- [ ] HTTP/2 [#4](https://github.com/nhooyr/websocket/issues/4) -- [ ] The holy grail [#402](https://github.com/nhooyr/websocket/issues/402) +- [ ] Perfect examples [#217](https://github.com/coder/websocket/issues/217) +- [ ] wstest.Pipe for in memory testing [#340](https://github.com/coder/websocket/issues/340) +- [ ] Ping pong heartbeat helper [#267](https://github.com/coder/websocket/issues/267) +- [ ] Ping pong instrumentation callbacks [#246](https://github.com/coder/websocket/issues/246) +- [ ] Graceful shutdown helpers [#209](https://github.com/coder/websocket/issues/209) +- [ ] Assembly for WebSocket masking [#16](https://github.com/coder/websocket/issues/16) + - WIP at [#326](https://github.com/coder/websocket/pull/326), about 3x faster +- [ ] HTTP/2 [#4](https://github.com/coder/websocket/issues/4) +- [ ] The holy grail [#402](https://github.com/coder/websocket/issues/402) ## Examples @@ -110,7 +110,7 @@ Advantages of [gorilla/websocket](https://github.com/gorilla/websocket): - [Prepared writes](https://pkg.go.dev/github.com/gorilla/websocket#PreparedMessage) - Configurable [buffer sizes](https://pkg.go.dev/github.com/gorilla/websocket#hdr-Buffers) - No extra goroutine per connection to support cancellation with context.Context. This costs github.com/coder/websocket 2 KB of memory per connection. - - Will be removed soon with [context.AfterFunc](https://github.com/golang/go/issues/57928). See [#411](https://github.com/nhooyr/websocket/issues/411) + - Will be removed soon with [context.AfterFunc](https://github.com/golang/go/issues/57928). See [#411](https://github.com/coder/websocket/issues/411) Advantages of github.com/coder/websocket: @@ -128,9 +128,9 @@ Advantages of github.com/coder/websocket: - Gorilla requires registering a pong callback before sending a Ping - Can target Wasm ([gorilla/websocket#432](https://github.com/gorilla/websocket/issues/432)) - Transparent message buffer reuse with [wsjson](https://pkg.go.dev/github.com/coder/websocket/wsjson) subpackage -- [1.75x](https://github.com/nhooyr/websocket/releases/tag/v1.7.4) faster WebSocket masking implementation in pure Go +- [1.75x](https://github.com/coder/websocket/releases/tag/v1.7.4) faster WebSocket masking implementation in pure Go - Gorilla's implementation is slower and uses [unsafe](https://golang.org/pkg/unsafe/). - Soon we'll have assembly and be 3x faster [#326](https://github.com/nhooyr/websocket/pull/326) + Soon we'll have assembly and be 3x faster [#326](https://github.com/coder/websocket/pull/326) - Full [permessage-deflate](https://tools.ietf.org/html/rfc7692) compression extension support - Gorilla only supports no context takeover mode - [CloseRead](https://pkg.go.dev/github.com/coder/websocket#Conn.CloseRead) helper for write only connections ([gorilla/websocket#492](https://github.com/gorilla/websocket/issues/492)) diff --git a/accept.go b/accept.go index cc990428..26cfb292 100644 --- a/accept.go +++ b/accept.go @@ -149,7 +149,7 @@ func accept(w http.ResponseWriter, r *http.Request, opts *AcceptOptions) (_ *Con } w.WriteHeader(http.StatusSwitchingProtocols) - // See https://github.com/nhooyr/websocket/issues/166 + // See https://github.com/coder/websocket/issues/166 if ginWriter, ok := w.(interface { WriteHeaderNow() }); ok { @@ -282,7 +282,7 @@ func selectDeflate(extensions []websocketExtension, mode CompressionMode) (*comp for _, ext := range extensions { switch ext.name { // We used to implement x-webkit-deflate-frame too for Safari but Safari has bugs... - // See https://github.com/nhooyr/websocket/issues/218 + // See https://github.com/coder/websocket/issues/218 case "permessage-deflate": copts, ok := acceptDeflate(ext, mode) if ok { diff --git a/conn.go b/conn.go index 09234871..5a0c4213 100644 --- a/conn.go +++ b/conn.go @@ -39,7 +39,7 @@ const ( // with an appropriate reason. // // This applies to context expirations as well unfortunately. -// See https://github.com/nhooyr/websocket/issues/242#issuecomment-633182220 +// See https://github.com/coder/websocket/issues/242#issuecomment-633182220 type Conn struct { noCopy noCopy diff --git a/example_test.go b/example_test.go index 7026e311..1e2c7a7c 100644 --- a/example_test.go +++ b/example_test.go @@ -162,10 +162,10 @@ func ExampleConn_Ping() { // This example demonstrates full stack chat with an automated test. func Example_fullStackChat() { - // https://github.com/nhooyr/websocket/tree/master/internal/examples/chat + // https://github.com/coder/websocket/tree/master/internal/examples/chat } // This example demonstrates a echo server. func Example_echo() { - // https://github.com/nhooyr/websocket/tree/master/internal/examples/echo + // https://github.com/coder/websocket/tree/master/internal/examples/echo } diff --git a/mask_asm.go b/mask_asm.go index f9484b5b..496f064e 100644 --- a/mask_asm.go +++ b/mask_asm.go @@ -19,7 +19,7 @@ func mask(b []byte, key uint32) uint32 { // For example, the arm64 implementation doesn't align memory like the amd64. // Or the amd64 implementation could use AVX512 instead of just AVX2. // The AVX2 code I had to disable anyway as it wasn't performing as expected. -// See https://github.com/nhooyr/websocket/pull/326#issuecomment-1771138049 +// See https://github.com/coder/websocket/pull/326#issuecomment-1771138049 // //go:noescape //lint:ignore U1000 disabled till v1.9.0 diff --git a/netconn.go b/netconn.go index 1f73b04b..a854faa4 100644 --- a/netconn.go +++ b/netconn.go @@ -15,7 +15,7 @@ import ( // It's for tunneling arbitrary protocols over WebSockets. // Few users of the library will need this but it's tricky to implement // correctly and so provided in the library. -// See https://github.com/nhooyr/websocket/issues/100. +// See https://github.com/coder/websocket/issues/100. // // Every Write to the net.Conn will correspond to a message write of // the given type on *websocket.Conn. diff --git a/read.go b/read.go index 64822511..663822c1 100644 --- a/read.go +++ b/read.go @@ -30,7 +30,7 @@ import ( // // If you need a separate timeout on the Reader call and the Read itself, // use time.AfterFunc to cancel the context passed in. -// See https://github.com/nhooyr/websocket/issues/87#issue-451703332 +// See https://github.com/coder/websocket/issues/87#issue-451703332 // Most users should not need this. func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) { return c.reader(ctx)