Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions accept.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
29 changes: 14 additions & 15 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,30 @@ set -eu
cd -- "$(dirname "$0")/.."

(
cd ./internal/examples
go test "$@" ./...
cd ./internal/examples
go test "$@" ./...
)
(
cd ./internal/thirdparty
go test "$@" ./...
cd ./internal/thirdparty
go test "$@" ./...
)

(
GOARCH=arm64 go test -c -o ./ci/out/websocket-arm64.test "$@" .
if [ "$#" -eq 0 ]; then
if [ "${CI-}" ]; then
sudo apt-get update
sudo apt-get install -y qemu-user-static
ln -s /usr/bin/qemu-aarch64-static /usr/local/bin/qemu-aarch64
fi
qemu-aarch64 ./ci/out/websocket-arm64.test -test.run=TestMask
fi
GOARCH=arm64 go test -c -o ./ci/out/websocket-arm64.test "$@" .
if [ "$#" -eq 0 ]; then
if [ "${CI-}" ]; then
sudo apt-get update
sudo apt-get install -y qemu-user-static
ln -s /usr/bin/qemu-aarch64-static /usr/local/bin/qemu-aarch64
fi
qemu-aarch64 ./ci/out/websocket-arm64.test -test.run=TestMask
fi
)


go install github.com/agnivade/wasmbrowsertest@8be019f6c6dceae821467b4c589eb195c2b761ce
go test --race --bench=. --timeout=1h --covermode=atomic --coverprofile=ci/out/coverage.prof --coverpkg=./... "$@" ./...
sed -i.bak '/stringer\.go/d' ci/out/coverage.prof
sed -i.bak '/nhooyr.io\/websocket\/internal\/test/d' ci/out/coverage.prof
sed -i.bak '/github\.com\/coder\/websocket\/internal\/test\//d' ci/out/coverage.prof
sed -i.bak '/examples/d' ci/out/coverage.prof

# Last line is the total coverage.
Expand Down
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion internal/thirdparty/frame_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func benchmark_mask(b *testing.B) {
},

{
name: "nhooyr-go",
name: "coder-go",
fn: func(b *testing.B, key [4]byte, p []byte) {
key32 := binary.LittleEndian.Uint32(key[:])
b.ResetTimer()
Expand Down
2 changes: 1 addition & 1 deletion mask_asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion netconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion read.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading