AnyEve...ferPrep(3pm)

πŸ“¦ version 0.20, in ubuntu stonking

✨ NAME ✨

AnyEvent::FTP::Server::Role::TransferPrep β€” it's the interface bestie, the one for PASV, PORT and REST commands πŸ’… (also known by its lil truncated nickname AnyEve...ferPrep(3pm), which is literally how the manual page header shortens it, iykyk)


πŸŽ€ VERSION πŸŽ€

version 0.20 β€” she's at 0.20 and thriving ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so the whole vibe is: you're building your own FTP server context, and you just with this role in like it's a friendship bracelet 🫢

package AnyEvent::FTP::Server::Context::MyContext;

use Moo;
extends 'AnyEvent::FTP::Server::Context';
with 'AnyEvent::FTP::Server::Role::TransferPrep';

🌸 DESCRIPTION 🌸

so this role hands your FTP server context the three transfer prep commands β€” PORT, PASV and REST. that's it, that's the job πŸ’–

but fr fr, she is not a solo act. on her own she's giving "girl who showed up to the group project with no slides" β€” not really useful by itself 😭. she needs a transfer role to actually do stuff, like AnyEvent::FTP::Server::Role::TransferFetch or AnyEvent::FTP::Server::Role::TransferPut. no cap, they're the besties she needs 🌈


πŸ‘‘ ATTRIBUTES πŸ‘‘

πŸ“ data

my $connection = $context->data

the data connection that got prepared by the FTP PASV or PORT command β€” this is an AnyEvent::Handle. the moment you call it, it's her ✨

πŸ“ restart_offset

my $offset = $context->restart_offset;

the offset that was specified in the last FTP REST command. and listen β€” this is supposed to be a positive integer, okay? positive. integer. periodt πŸ’…


🧚 METHODS 🧚

πŸ’œ clear_data

$context->clear_data;

wipes the data and the restart_offset attributes. clean slate energy, out with the old πŸ”₯


πŸ’… COMMANDS πŸ’…

just so we're all on the same page, here's the trio:

  • PASV
  • PORT
  • REST

🌈 AUTHOR 🌈

Author: Graham Ollis <plicease@cpan.org>

Contributors, aka the girlies who hopped on the aux πŸŽ€:

  • Ryo Okamoto
  • Shlomi Fish
  • JosΓ© JoaquΓ­n Atria

This software is copyright (c) 2017-2022 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. literally free, go off πŸ’–


okay bestie that's the whole page, you ate 🫢 this was AnyEve...ferPrep(3pm), drafted up by perl v5.40.1 on 2026-02-16 β€” the footer said so, so it's canon ✨ bye, slay, go write your server πŸ’…
πŸ“¦ where this page comes from