php8.5
Home/ Manual/ eio / functions/ eio_sendfile

eio_sendfile

PHP function Edit on GitHub ✎

(PECL eio >= 0.0.1dev)

Transfer data between file descriptors

Description

eio_sendfile(mixed $out_fd, mixed $in_fd, int $offset, int $length, [int $pri], [callable $callback], [string $data]): resource

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

Parameters

out_fd

Output stream, Socket resource, or file descriptor. Should be opened for writing.

in_fd

Input stream, Socket resource, or file descriptor. Should be opened for reading.

offset

Offset within the source file.

length

Number of bytes to copy.

pri

Values

callback

Proto

data

Arbitrary variable passed to callback.

Return Values

eio_sendfile() returns request resource on success,Falseforfailure.

Source: reference/eio/functions/eio-sendfile.xml · from the official PHP manual (php/doc-en)