mozilla-services / pushgo

🚨🚨🚨OBSOLETE AND UNMAINTAINED🚨🚨🚨 See Autopush for the current server.
https://github.com/mozilla-services/autopush
Mozilla Public License 2.0
24 stars 10 forks source link

Send Websocket Ping frames #174

Closed bbangert closed 9 years ago

bbangert commented 9 years ago

To ensure connections stay alive, the server should have a configurable parameter indicating how frequently it should send a websocket ping frame.

ghost commented 9 years ago

This is an interesting one, given that golang.org/x/net/websocket doesn't expose any hooks for sending PING frames—though it can receive and process them. We might need to send an application-level ping ({}) instead.

Edit: The protocol layer can process PINGs, but not PONGs.

bbangert commented 9 years ago

Agreed, it'll be easier to send {} in a text frame.