It seems like the browser you are using has JavaScript disabled. As a result, the site will not function properly. We really want you to enable it so you may experience our site as we intended it. If you have no idea what we are talking about or if you need help, visit http://www.enable-javascript.com×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

Oops, it seems like you're using an old browser that we do not fully support. If you're able to, please upgrade your browser here.×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

Synopsis:

Since:

Arguments:

An array of iov_t objects where the function can store
the data that it reads.

iovcnt

The number of entries in the iov array.
The maximum number of entries is UIO_MAXIOV.

Library:

libc

Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.

Description:

The readv() function attempts to read from
the file associated with the open file descriptor, fildes,
placing the data into iovcnt buffers specified by the members
of the iov array: iov[0], iov[1], …,
iov[iovcnt-1].

On a regular file or other file capable of seeking, readv()
starts at a position in the file given by the file offset associated
with fildes. Before successfully returning from
readv(), the file offset is incremented by the number of bytes
actually read.

The iov_t structure contains the following members:

iov_base

The base address of a memory area where data should be placed.

iov_len

The length of the memory area.

The readv() function always fills one buffer completely before proceeding to
the next.

The readv() call ignores advisory locks that may have
been set by the
fcntl() function.

On a file not capable of seeking, readv() starts at the current
position.

When readv() returns successfully, its return value is the
number of bytes actually read and placed in the buffer. This number
will never be greater than the combined sizes of the iov buffers,
although it may be less for one of the following reasons:

The number of bytes left in the file is less than the combined size
of the iov buffers.

The readv() request was interrupted by a signal.

The file is a pipe (or FIFO) or a special file, and has
fewer bytes immediately available for reading. For
example, reading from a file associated with a terminal may return one
typed line of data.

If readv() is interrupted by a signal before it reads any data,
it returns a value of -1 and sets
errno
to
EINTR. However, if readv() is interrupted by a signal
after it has successfully read some data, it returns the number of bytes read.

No data is transferred past the current end-of-file. If the starting
position is at or after the end-of-file, readv() returns zero.
If the file is a device special file, the result of subsequent calls
to readv() will work, based on the then current state of the
device (that is, the end of file is transitory).

When attempting to read from an empty pipe or FIFO:

If no process has the pipe open for writing, readv() returns 0
to indicate end-of-file.

If a process has the pipe open for writing, and O_NONBLOCK
is set, readv() returns -1 and sets errno to
EAGAIN.

If a process has the pipe open for writing, and
O_NONBLOCK
is clear, read() blocks until some data is written, or the pipe
is closed by all processes that had opened it for writing.

When attempting to read from a file (other than a pipe or FIFO) that
supports nonblocking reads and has no data currently available:

If O_NONBLOCK is set, readv() returns -1 and
sets errno to EAGAIN.

If O_NONBLOCK is clear, readv() blocks until
some data is available.

The O_NONBLOCK flag has no effect if some data is
available.

If you call readv() on a portion of a file, prior to the
end-of-file, that hasn't been written, it returns bytes with the
value zero.

If readv() succeeds, the st_atime field of the file is
marked for update.

1. Choose your focus

This is the focus controller. Use this controller to choose your primary development approach (Cascades or Core).

By selecting a focus, you get to decide what content should be front and center on the site.

2. Download the tools

Before you start developing, you'll need to visit the Downloads tab. Here you'll find downloads for the BlackBerry 10 Native SDK, BlackBerry 10 Device Simulator, and some other useful tools.

3. Try the sample apps

Now featuring a filter control, the Sample apps tab allows you to search for samples by name or by feature.

Select either the Core or Cascades check boxes to display the samples relevant to your focus.

4. Educate yourself

The Documentation tab contains tons of examples, tutorials, and best practices to guide you along the path towards building an awesome app.

The documentation for your preferred focus always appears at the top of the left-hand navigation, but you can still access the rest of the documentation at the bottom.

5. Start developing

The Reference tab is where you'll find essential details about how to use our APIs.

You can use the left-hand navigation to choose how you would like to browse the reference: by module, by topic, or alphabetically. If you have an idea of what you are looking for, start typing it in the Filter box.