A simple keep-alive protocol
Handle keepalive properly