As recently as 2013, the go.net websocket library does not support (automatic) keep-alive messages. You have two options:
- Implement an "application level" keep-alive by periodically having your application send a message down the pipe (either direction should work), that is ignored by the other side.
- Move to a different websocket library that does support keep-alives (like this one) Edit: it looks like that library has been superseded by Gorilla websockets.