The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

AnyEvent::FTP::Server - Simple asynchronous ftp server

VERSION

version 0.03

SYNOPSIS

 use AnyEvent;
 use AnyEvent::FTP::Server;
 
 my $server = AnyEvent::FTP::Server->new;
 $server->start;
 AnyEvent->condvar->recv;

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.

This class is used for AnyEvent::FTP server instances. Each time a client connects to the server a AnyEvent::FTP::Server::Connection instance is created to manage the TCP connection. Each connection also has a AnyEvent::FTP::Server::Context which defines the behavior or personality of the server, and each context instance keeps track of the current directory, user authentication and authorization status of each connected client.

ATTRIBUTES

$server->hostname

Readonly, and should be assigned at the constructor. The hostname to listen on.

$server->port

The port to listen to. Default is 21 - a different port can be assigned at the constructor.

$server->default_context

Readonly: the default context class (can be set as a parameter in the constructor).

$server->welcome

The welcome messages as key value pairs. Read only and can be overridden by the constructor.

$server->bindport([$port])

Retrieves or sets the TCP port to bind to.

my $bool = $server->inet

Readonly (assignable via the constructor). If true, then assume a TCP connection has been established by inet. The default (false) is to start a standalone server.

METHODS

$server->start()

Call this method to start the service.

SEE ALSO

Net::FTPServer

AUTHOR

author: Graham Ollis <plicease@cpan.org>

contributors:

Ryo Okamoto

Shlomi Fish

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 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.