… | |
… | |
338 | |
338 | |
339 | =item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
339 | =item aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
340 | |
340 | |
341 | =item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
341 | =item aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
342 | |
342 | |
343 | Reads or writes C<$length> bytes from the specified C<$fh> and C<$offset> |
343 | Reads or writes C<$length> bytes from or to the specified C<$fh> and |
344 | into the scalar given by C<$data> and offset C<$dataoffset> and calls the |
344 | C<$offset> into the scalar given by C<$data> and offset C<$dataoffset> |
345 | callback without the actual number of bytes read (or -1 on error, just |
345 | and calls the callback without the actual number of bytes read (or -1 on |
346 | like the syscall). |
346 | error, just like the syscall). |
347 | |
347 | |
348 | If C<$offset> is undefined, then the current file descriptor offset will |
348 | If C<$offset> is undefined, then the current file descriptor offset will |
349 | be used (and updated), otherwise the file descriptor offset will not be |
349 | be used (and updated), otherwise the file descriptor offset will not be |
350 | changed by these calls. |
350 | changed by these calls. |
351 | |
351 | |
352 | If C<$length> is undefined in C<aio_write>, use the remaining length of C<$data>. |
352 | If C<$length> is undefined in C<aio_write>, use the remaining length of |
|
|
353 | C<$data>. |
353 | |
354 | |
354 | If C<$dataoffset> is less than zero, it will be counted from the end of |
355 | If C<$dataoffset> is less than zero, it will be counted from the end of |
355 | C<$data>. |
356 | C<$data>. |
356 | |
357 | |
357 | The C<$data> scalar I<MUST NOT> be modified in any way while the request |
358 | The C<$data> scalar I<MUST NOT> be modified in any way while the request |