… | |
… | |
380 | |
380 | |
381 | This call tries to make use of a native C<sendfile> syscall to provide |
381 | This call tries to make use of a native C<sendfile> syscall to provide |
382 | zero-copy operation. For this to work, C<$out_fh> should refer to a |
382 | zero-copy operation. For this to work, C<$out_fh> should refer to a |
383 | socket, and C<$in_fh> should refer to mmap'able file. |
383 | socket, and C<$in_fh> should refer to mmap'able file. |
384 | |
384 | |
385 | If the native sendfile call fails or is not implemented, it will be |
385 | If the native sendfile call fails with C<ENOSYS>, C<ENOTSUP>, |
|
|
386 | C<EOPNOTSUPP> or C<ENOTSOCK>, or is not implemented, it will be emulated, |
386 | emulated, so you can call C<aio_sendfile> on any type of filehandle |
387 | so you can call C<aio_sendfile> on any type of filehandle regardless of |
387 | regardless of the limitations of the operating system. |
388 | the limitations of the operating system. |
388 | |
389 | |
389 | Please note, however, that C<aio_sendfile> can read more bytes from |
390 | Please note, however, that C<aio_sendfile> can read more bytes from |
390 | C<$in_fh> than are written, and there is no way to find out how many |
391 | C<$in_fh> than are written, and there is no way to find out how many |
391 | bytes have been read from C<aio_sendfile> alone, as C<aio_sendfile> only |
392 | bytes have been read from C<aio_sendfile> alone, as C<aio_sendfile> only |
392 | provides the number of bytes written to C<$out_fh>. Only if the result |
393 | provides the number of bytes written to C<$out_fh>. Only if the result |