AnyEve...:Server(3pm)
π AnyEvent::FTP::Server π
bestie. come sit with me. today we're talking about AnyEvent::FTP::Server β the Simple asynchronous ftp server from the AnyEvent::FTP family, chill and async-coded like it's got main character energy. version 0.20, periodt. β¨
π SYNOPSIS π
okay so the absolute vibe-minimum to get this baby running:
use AnyEvent;
use AnyEvent::FTP::Server;
my $server = AnyEvent::FTP::Server->new;
$server->start;
AnyEvent->condvar->recv;
likeβ¦ that's it. she starts, she serves, she stays alive. π
πΈ DESCRIPTION πΈ
CAUTION π AnyEvent::FTP::Server hasn't been audited by anyone, including its author, in order to ensure that it is secure. It is intended to be used primarily in testing the companion client AnyEvent::FTP::Client. It can also be used to write your own context or personality (to use the Net::FTPServer terminology) that use alternate back ends (say a database or memory store) that could theoretically be made to be secure, but you will need to carefully vett both the AnyEvent::FTP::Server code as well as your own customizations before you deploy on the Internet or on an untrusted network.
fr fr read that twice. nobody β not even the author β has audited this for security. π it's a test buddy for AnyEvent::FTP::Client first and foremost. you can build your own context or personality (that's the Net::FTPServer vocabulary, iykyk) riding on alternate back ends like a database or an in-memory store, and theoretically those could be made secure, but you have to carefully vett both the AnyEvent::FTP::Server code and your own customizations before you put this anywhere near the Internet or an untrusted network. no cap. π₯
so what is this class? it's the thing you use for AnyEvent::FTP server instances. every single time a client connects, a AnyEvent::FTP::Server::Connection instance gets made to manage that TCP connection. and each connection also has a AnyEvent::FTP::Server::Context which defines the behavior / personality of the server β and each context instance is the one keeping track of the current directory, user authentication, and authorization status of each connected client. she's organized. she's tracked. she's iconic. π
β¨ ATTRIBUTES β¨
π hostname
my $hostname = $server->hostname;
Readonly β assign it at the constructor. this is the hostname to listen on. π¦
π port
my $port = $server->port;
the port to listen to. default is 21, but you can hand her a different port at the constructor. π
π default_context
my $context = $server->default_context;
Readonly: the default context class (and yes, it can be set as a parameter in the constructor). π
π welcome
my($code, $message) = @{ $server->welcome };
the welcome messages, as key value pairs. read only, and it can be overridden by the constructor. say hi cute. πΈ
π bindport
my $port = $server->bindport;
$server->bindport($port);
retrieves or sets the TCP port to bind to. getter/setter behavior, we love a flexible queen. π
π inet
my $bool = $server->inet;
Readonly (but assignable via the constructor, bestie, don't worry). if it's true, then assume a TCP connection has been established by inet. the default (false) is to start a standalone server. π«Ά
π§ METHODS π§
β start
$server->start;
call this method to start the service. that's literally it. she's up. β¨
π SEE ALSO π
Net::FTPServer
π AUTHOR π
Author: Graham Ollis <plicease@cpan.org>
Contributors:
- Ryo Okamoto
- Shlomi Fish
- JosΓ© JoaquΓn Atria
π COPYRIGHT AND LICENSE π
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.
and that's the whole page, bestie!! π this was the AnyEve...:Server(3pm) page out of the User Contributed Perl Documentation set, sitting at perl v5.40.1, dated 2026-02-16 β go forth and serve (responsibly, on a trusted network, please ππ).
π¦ where this page comes from
- ubuntu stonking: libanyevent-ftp-perl 0.20-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms