websocket
websocket copied to clipboard
Minimal and idiomatic WebSocket library for Go
When `websocket.Dial` fails, my app wants to take differents actions depending on the HTTP status code, and ideally the body too. Is there any chance of modifying Dial to return...
**What does this error mean?** You can read the context log of this issue at https://github.com/switchupcb/disgo/issues/81. Here is the code involved. ```json {"level":"info","time":"2025-02-25T11:15:50.047882793Z","session":"19a66158dd23faa53df0a0cce17ea441","client":"948649712649662524","message":"received signal:
Somewhere between v1.8.10 and v1.8.11 (probably b0ec2015), Websockets stopped working on Chrome (android) with the following error: ``` WebSocket connection to 'wss://[...]' failed: Close received after close ````
Bumps the internal-deps group with 1 update in the /internal/examples directory: [golang.org/x/time](https://github.com/golang/time). Updates `golang.org/x/time` from 0.7.0 to 0.10.0 Commits 2c6c5a2 rate: prevent overflows when calculating durationFromTokens 1ce61fe rate: make function...
What is the error type of this error so I can ignore it? Here is an example of an error type within this library. ```go closeErr := new(websocket.CloseError) if errors.As(err,...
## The problem It looks like that by default the library uses the default HTTPClient: https://github.com/coder/websocket/blob/d1468a75eee5525d183123766fbf288dca1eed9b/dial.go#L76-L103 And [the default HTTP client](https://pkg.go.dev/net/http#Client) _does_ follow redirects: > // If CheckRedirect is nil,...
``` [kpachhai@kpwarmachine ~/repos/github.com/nuklai/nuklai] $ go clean -modcache [kpachhai@kpwarmachine ~/repos/github.com/nuklai/nuklai] $ go version go version go1.22.7 linux/amd64 [kpachhai@kpwarmachine ~/repos/github.com/nuklai/nuklai] $ go get nhooyr.io/[email protected] go: nhooyr.io/[email protected]: invalid version: unknown revision v1.8.6 ```
I'm writing a TCP reverse proxy over Websocket and I'm trying to use this library. However, it provides no way to close the write side only. That's needed to indicate...
Hello, Instead of the Go standard `net/http`, I am using [FastHTTP](https://github.com/valyala/fasthttp) as my webserver, in order to upgrade to websockets using [FastHTTP websocket](https://github.com/fasthttp/websocket). It currently looks something like this, which...
Return the close error when the WebSocket is closed (when running in WASM). Previously, when the WebSocket connection is closed by the server, `Read` always returns `net.ErrClosed`, which prevents the...