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.

Description:

Use this function when you are communicating 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 allowed for a single MsgSend, call qvm_msgblock_oneshot().

To configure default timeouts, use the qvm set option's message-block-timeout and vdev-message-block-timeout options (see the set section in the "VM Configuration Reference" chapter in the User's Guide).

Returns:

EOK if successful; otherwise an errno value.