Hacker News new | ask | show | jobs
by goldbrick 3691 days ago
In particular I wished they would have elaborated on the claimed instability in x/net/websocket.
2 comments

I can't speak to instability, but I had to rewrite a massive stack because gorilla gave me callbacks to execute on control packets and x/net/websocket didn't.

If you have any sort of long lived mobile connection, you will encounter half closed sockets due to mobile network quirks. At scale you really want to clean these up. To do so, you need an application level timeout and you want to listen to the PING/PONG control frames to reset that timeout.

> If you have any sort of long lived mobile connection, you will encounter half closed sockets due to mobile network quirks. At scale you really want to clean these up.

Could golang.org/x/net/context.WithTimeout be used to handle this?