Add ping handler.