1
\alias{gInputStreamReadAsync}
2
\name{gInputStreamReadAsync}
3
\title{gInputStreamReadAsync}
4
\description{Request an asynchronous read of \code{count} bytes from the stream into the buffer
5
starting at \code{buffer}. When the operation is finished \code{callback} will be called.
6
You can then call \code{\link{gInputStreamReadFinish}} to get the result of the
8
\usage{gInputStreamReadAsync(object, count, io.priority = 0, cancellable = NULL, callback, user.data = NULL)}
10
\item{\verb{object}}{A \code{\link{GInputStream}}.}
11
\item{\verb{count}}{the number of bytes that will be read from the stream}
12
\item{\verb{io.priority}}{the I/O priority
14
\item{\verb{cancellable}}{optional \code{\link{GCancellable}} object, \code{NULL} to ignore.}
15
\item{\verb{callback}}{callback to call when the request is satisfied}
16
\item{\verb{user.data}}{the data to pass to callback function}
18
\details{During an async request no other sync and async calls are allowed on \code{stream}, and will
19
result in \code{G_IO_ERROR_PENDING} errors.
21
A value of \code{count} larger than \code{G_MAXSSIZE} will cause a \code{G_IO_ERROR_INVALID_ARGUMENT} error.
23
On success, the number of bytes read into the buffer will be passed to the
24
callback. It is not an error if this is not the same as the requested size, as it
25
can happen e.g. near the end of a file, but generally we try to read
26
as many bytes as requested. Zero is returned on end of file
27
(or if \code{count} is zero), but never otherwise.
29
Any outstanding i/o request with higher priority (lower numerical value) will
30
be executed before an outstanding request with lower priority. Default
31
priority is \code{G_PRIORITY_DEFAULT}.
33
The asyncronous methods have a default fallback that uses threads to implement
34
asynchronicity, so they are optional for inheriting classes. However, if you
35
override one you must override all.}
37
A list containing the following elements:
38
\item{\verb{buffer}}{a buffer to read data into (which should be at least count bytes long).}
40
\author{Derived by RGtkGen from GTK+ documentation}