number of messages received, or -1 on error. Note that the number of messages received may be smaller than @num_messages if @timeout is zero or positive, if the peer closed the connection, or if @num_messages was larger than UIO_MAXIOV (1024), in which case the caller may re-try to receive the remaining messages.
GException on failure.