Merged the two recv_packet methods of Server