AnyEvent::FTP::Server::Role::TransferPrep - Interface for PASV, PORT and REST commands
version 0.19
package AnyEvent::FTP::Server::Context::MyContext; use Moo; extends 'AnyEvent::FTP::Server::Context'; with 'AnyEvent::FTP::Server::Role::TransferPrep';
This role provides the FTP transfer preparation commands PORT
, PASV
and REST
to your FTP server context. It isn't really useful by itself, and needs a transfer role, like AnyEvent::FTP::Server::Role::TransferFetch or AnyEvent::FTP::Server::Role::TransferPut.
my $connection = $context->data
The data connection prepared from the FTP PASV
or PORT
command. This is an AnyEvent::Handle.
my $offset = $context->restart_offset;
The offset specified in the last FTP REST
command. This should be a positive integer.
$context->clear_data;
Clears the data
and restart_offset
attributes.
Author: Graham Ollis <plicease@cpan.org>
Contributors:
Ryo Okamoto
Shlomi Fish
José Joaquín Atria
This software is copyright (c) 2017-2021 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.