Description
We've been using the golang.org/x/net/websocket
package for a long time, mostly because I trust an "official" library more than an alternative. The "official" package does warn that:
This package currently lacks some features found in an alternative and more actively maintained WebSocket package.
Unfortunately this is only half the truth. The full truth is, that due to the missing features, connections between the package and a proper implementation will often break.
- One issue is that
x/net/websocket
does not implement pings and will choke on them (rpc: WebSocket client treats pings as errors ethereum/go-ethereum#19798). - Another issue (I think) is that
x/net/websocket
does not support continuation frames and will choke on them (Geth >= 1.8.3 can't deploy large contracts over websockets ethereum/go-ethereum#16846).
My point really being here is that the "official" websocket package is not simply missing some features, rather those features will lead to serious - and hard to debug - issues down the line. As I see it, x/net/websocket
is not going to be brought up to spec with websocket proper, and there are better alternatives.
Could we deprecate the package? Ideally I'd just delete it, but that's probably too drastic and would break dependent code.