cygni / snakebot

http://snake.cygni.se
MIT License
2 stars 7 forks source link

Implement ping/pong to keep clients alive #37

Closed emilb closed 8 years ago

emilb commented 8 years ago

Let all clients send a ping over the websocket every 30 secs. The server replies with a pong and thus keeping the socket alive.

blackenedsystems commented 8 years ago

Implemented heartbeat logic. Couldn't see how to have a single heartbeat - the player connections and the FXClient use different mechanisms, so there's a player heartbeat and api heartbeat. Maybe there's a cleaner way to do this?

emilb commented 8 years ago

Took some of Allans work but changed it to HeartBeatRequest.