use coder/websocket for everything, get rid of gobwas.

supposedly it is faster, and anyway it's better to use it since we're already using it for wasm/js.

(previously named nhooyr/websocket).
This commit is contained in:
fiatjaf
2025-01-03 01:15:12 -03:00
parent b33cfb19fa
commit defc349e57
9 changed files with 101 additions and 243 deletions

View File

@ -149,8 +149,8 @@ func TestConnectWithOrigin(t *testing.T) {
defer ws.Close()
// relay client
r := NewRelay(context.Background(), NormalizeURL(ws.URL))
r.RequestHeader = http.Header{"origin": {"https://example.com"}}
r := NewRelay(context.Background(), NormalizeURL(ws.URL),
WithRequestHeader(http.Header{"origin": {"https://example.com"}}))
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
err := r.Connect(ctx)