limb 0.2.0

2024-01-09

siov_scatter(3)
limb manual
siov_scatter(3)

NAME

siov_scatter - scatter data from a byte array into an array of vectors

SYNOPSIS

#include <limb/siovec.h>
size_t siov_scatter(const struct iovec *v, unsigned int n, const char *data, size_t dlen)

DESCRIPTION

The siov_scatter() function scatters data pointed by data of length dlen into the array v of n vectors.

You can think of it as the opposite of siov_gather(3).

It is similar to siov_deal(3) only copying data from a byte array instead of another array of vectors. As such, the note on siov_deal(3) applies here as well.

RETURN VALUE

The siov_scatter() function returns the amount of data copied, which may be less than dlen, if there wasn't enough space in the memory represented by the v array of n vectors, or less than what siov_len(v, n) would return, as explained in siov_deal(3).

SEE ALSO

siov_deal(3), siov_gather(3)

limb 0.1.0
2023-07-24
siov_scatter(3)