eio_sendfile

(PECL eio >= 0.0.1dev)

eio_sendfile — Transfer data between file descriptors


Описание

ReturnType eio_sendfile ( string $out_fd , string $in_fd , string $offset , string $length [, string $pri [, string $callback [, string $data ]]] )

eio_sendfile() copies data between one file descriptor and another. See SENDFILE(2) man page for details.


Список параметров

out_fd -

Output file descriptor. Should be opened for writing.

in_fd -

Input file descriptor. Should be opened for reading.

offset -

Offset within the source file.

length -

Number of bytes to copy.

pri -

Приоритет запросов: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, или NULL. Если передан NULL, то pri устанавливается в EIO_PRI_DEFAULT.

callback -

Функция callback вызывается при завершении запроса. Она должна удовлетворять следующему прототипу:

void callback($data, $result);

$data является пользовательскими данными, переданными в запросе. $result содержит результирующее значение зависящее от запроса; обычно, это значение возвращаемое соответствующим системным вызовом.

data -

Arbitrary variable passed to callback.


Возвращаемые значения

eio_sendfile() returns request resource on success or FALSE on error.




Смотрите также:
Описание на ru2.php.net
Описание на php.ru