(PECL eio >= 0.0.1dev)
eio_sendfile — Transfer data between file descriptors
$out_fd
, mixed $in_fd
, int $offset
, int $length
[, int $pri
[, callable $callback
[, string $data
]]] ) : resourceeio_sendfile() copies data between one file descriptor and another. See SENDFILE(2) man page for details.
out_fdOutput stream, Socket resource, or file descriptor. Should be opened for writing.
in_fdInput stream, Socket resource, or file descriptor. Should be opened for reading.
offsetOffset within the source file.
lengthNumber of bytes to copy.
pri��������ȼ���EIO_PRI_DEFAULT��EIO_PRI_MIN��EIO_PRI_MAX �� NULL�������
NULL��pri ����Ϊ
EIO_PRI_DEFAULT��
callback
callback
�������������ʱ�����á���Ӧƥ��һ��ԭ�ͣ�
void callback(mixed $data, int $result[, resource $req]);
data���ݸ�������û����ݡ�
result�������Ľ����ֵ��ͨ������Ӧ��ϵͳ���÷��ص�ֵ��
req��ѡ��������Դ���ɱ� eio_get_last_error() ֮��ĺ���ʹ�á�
data
Arbitrary variable passed to callback.
eio_sendfile() returns request resource on success or FALSE on error.