fix bugs: ack for heartbeat and incomplete frame, refactor server data parse