diff --git a/ci/test.mk b/ci/test.mk index 786a8d770e6a4e02e14cfe18218d75a57910bc63..3fc34bbf6ce0ff0b5d44d492ae542d66acac916b 100644 --- a/ci/test.mk +++ b/ci/test.mk @@ -12,6 +12,6 @@ coveralls: gotest goveralls -coverprofile=ci/out/coverage.prof gotest: - go test -covermode=count -coverprofile=ci/out/coverage.prof -coverpkg=./... $${GOTESTFLAGS-} ./... + go test -timeout=30m -covermode=count -coverprofile=ci/out/coverage.prof -coverpkg=./... $${GOTESTFLAGS-} ./... sed -i '/stringer\.go/d' ci/out/coverage.prof sed -i '/nhooyr.io\/websocket\/internal\/test/d' ci/out/coverage.prof diff --git a/conn.go b/conn.go index e58a8748e31af9c0dc2995d0b8babddc1842356e..a41808be3fadbfc8550035a83d5c17828a1fd795 100644 --- a/conn.go +++ b/conn.go @@ -1,5 +1,3 @@ -// +build !js - package websocket // MessageType represents the type of a WebSocket message. diff --git a/read.go b/read.go index 42d46b85cf3f0ce5a510c111a62c56081ce4ac28..a9c291d17429f1cd640e1e285a09b620ed2a79f8 100644 --- a/read.go +++ b/read.go @@ -120,7 +120,7 @@ func (mr *msgReader) flateContextTakeover() bool { } func (c *Conn) readRSV1Illegal(h header) bool { - // If compression is disabled, rsv1 is always illegal. + // If compression is disabled, rsv1 is illegal. if !c.flate() { return true } diff --git a/ws_js.go b/ws_js.go index de76afa6b65db963c3bab355543466a6751c196b..05c4c0626747b577208a101f8732c3179d998ec9 100644 --- a/ws_js.go +++ b/ws_js.go @@ -17,18 +17,6 @@ import ( "nhooyr.io/websocket/internal/xsync" ) -// MessageType represents the type of a WebSocket message. -// See https://tools.ietf.org/html/rfc6455#section-5.6 -type MessageType int - -// MessageType constants. -const ( - // MessageText is for UTF-8 encoded text messages like JSON. - MessageText MessageType = iota + 1 - // MessageBinary is for binary messages like protobufs. - MessageBinary -) - // Conn provides a wrapper around the browser WebSocket API. type Conn struct { ws wsjs.WebSocket