qvm_msgblock_start()

Set a maximum message time allowed for a block of MsgSends

Synopsis:

#include <qvm/utils.h>
int qvm_msgblock_start(const vdev_t *vdp,
                       unsigned mult)

Arguments:

vdp
A pointer to a virtual device, or NULL for global.
mult
The multiplier of the configured timeout.

Library:

Provided by qvm; no external library is required.

Description:

This function sets the maximum message time for all MsgSends until you call qvm_msgblock_stop().

Use this function when you are communication with an untrusted server, and you don't know how many MsgSends there will be. Wrap your messages with qvm_msgblock_start() and qvm_msgblock_stop() calls to make sure that you don't block if a server doesn't reply within the prescribed time.

To set the maximum message time for a single MsgSend, call qvm_msgblock_oneshot().

Returns:

EOK if successful; otherwise an errno value.