POE::Component::TFTPdA tftp-server, implemented through POE | |
Download |
POE::Component::TFTPd Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Jan Henning Thorsen
- Publisher web site:
- http://search.cpan.org/~jhthorsen/
POE::Component::TFTPd Tags
POE::Component::TFTPd Description
A tftp-server, implemented through POE POE::Component::TFTPd is a tftp-server, implemented through POE.SYNOPSIS POE::Session->create( inline_states => { _start => sub { POE::Component::TFTPd->create; $_->post($alias => 'start'); }, tftpd_init => sub { my($client, $fh) = ($_, undef); open($fh, "", $client->filename) if($client->wrq); $client->{'fh'} = $fh; }, tftpd_done => sub { my $client = $_; close $client->{'fh'}; }, tftpd_send => sub { my $client = $_; read $client->{'fh'}, my $data, $client->block_size; $_->post($alias => send_data => $client, $data); }, tftpd_receive => sub { my($client, $data) = @_; print { $client->{'fh'} } $data; $_->post($alias => send_ack => $client); }, tftpd_log => sub { my($level, $client, $msg) = @_; warn(sprintf "%s - %s:%i - %s ", $level, $client->address, $client->port, $msg, ); }, }, ); Requirements: · Perl
POE::Component::TFTPd Related Software