Subject: | Even example server fails |
your example fails to work:
#!/usr/bin/perl -w
#use local::lib '~/perl5';
use POE qw(Component::Server::FTP);
use Filesys::Virtual;
POE::Component::Server::FTP->spawn(
Alias => 'myftpd', # ftpd is default
ListenPort => 2112, # port to listen on
Version => 'ftpd v1.0', # shown on connection, you can mimic...
AnonymousLogin => 'deny', # deny, allow
FilesystemClass => 'Filesys::Virtual::Plain', # Currently the only one available
FilesystemArgs => {
'root_path' => '/tmp', # This is actual root for all paths
'cwd' => '/', # Initial current working dir
'home_path' => '/tmp', # Home directory for '~'
},
# use 0 to disable these Limits
DownloadLimit => (50 * 1024), # 50 kb/s per ip/connection (use LimitScheme to
configure)
UploadLimit => (100 * 1024), # 100 kb/s per ip/connection (use LimitScheme to
configure)
LimitScheme => 'ip', # ip or per (connection)
LogLevel => 4, # 4=debug, 3=less info, 2=quiet, 1=really quiet
TimeOut => 120, # Connection Timeout
);
$poe_kernel->run();
starting, trying to connect:
$ telnet localhost 2112
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
no success.
tested on Mac OSX,
@buki:~$ uname -a
Linux buki 2.6.26-1-686 #1 SMP Thu Oct 9 15:18:09 UTC 2008 i686 GNU/Linux
@buki:~$ perl -v
This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi