func newNhooyrWebsocketConn(ctx context.Context, u url.URL) (conn, error) {
	ctxWithTimeout, cancel := context.WithTimeout(ctx, 3*time.Second)
	defer cancel()
	conn, _, err := websocket.Dial(ctxWithTimeout, u.String(), &websocket.DialOptions{
		CompressionMode: websocket.CompressionContextTakeover,
		HTTPHeader: http.Header{
			"Content-Type": []string{"application/msgpack"},
		},
	})
	return &nhooyrWebsocketConn{
		conn:    conn,
		msgType: websocket.MessageBinary,
	}, err
}
newNhooyrWebsocketConn creates a new nhooyr websocket connection
package stream
import (
	"context"
	"net/http"
	"net/url"
	"time"
	"nhooyr.io/websocket"
)
type nhooyrWebsocketConn struct {
	conn    *websocket.Conn
	msgType websocket.MessageType
}