IO::Socket::INET::Daemon

IO::Socket::INET::Daemon is a very simple and straightforward TCP server.
Download

IO::Socket::INET::Daemon Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jonas Kramer
  • Publisher web site:
  • http://search.cpan.org/~jkramer/Tie-File-Hashify-0.03/lib/Tie/File/Hashify.pm

IO::Socket::INET::Daemon Tags


IO::Socket::INET::Daemon Description

IO::Socket::INET::Daemon is a very simple and straightforward TCP server. IO::Socket::INET::Daemon is a very simple and straightforward TCP server.SYNOPSIS use IO::Socket::INET::Daemon; my $host = new IO::Socket::INET::Daemon( port => 5000, timeout => 20, callback => { add => &add, remove => &remove, data => &data, }, ); $host->run; sub add { my $io = shift; $io->print("Welcome, ", $io->peerhost, ".n"); return !0; } sub remove { my $io = shift; warn $io->peerhost, " left.n"; } sub data { my ($io, $host) = @_; my $line = $io->getline; $line =~ s/r?n//; if($line eq 'quit') { $io->print("Bye.n"); return 0; } elsif($line eq 'stop') { $host->stop; } else { $io->print("You wrote: $linen"); return !0; } }This modules aims to provide a simple TCP server. It will listen on a port you specify, accept incoming connections and remove them again when they're dead. It provides three simple callbacks at the moment, but I plan to add a few more. Requirements: · Perl


IO::Socket::INET::Daemon Related Software