On Thu, Apr 06, 2017 at 12:43:16PM +0430, ali saeedi wrote:
> Hi
> what does 'qemu_file_rate_limit' function do?
> thanks
It returns 1 if the stream is not full (so that we can continue send
something), otherwise 0.
Generally, it's used like:
if (qemu_file_rate_limit(f)) {
/* we can still send something to the stream since it's not full */
} else {
/*
* either the stream is broken, or we have already sent enough
* data, so that it's reaching the limit we set via
* qemu_file_set_rate_limit(). We should not send anything now.
*/
}
And I would suggest avoid sending the same topic in two days. :)
-- peterx