Help for this page

Select Code to Download


  1. or download this
          require Net::Daemon;
          package Contdmon;
          use vars qw(@ISA);
          @ISA = qw(Net::Daemon); # to inherit from Net::Daem
    
  2. or download this
       sub new ($$;$) {
              my($class, $attr, $args) = @_;
    ...
            $self->{'logfile'} = $file;
          $self;
       }
    
  3. or download this
      sub Run ($) {
              my($self) = @_;
    ...
              }
           print "Server received request: $line\n";
    }
    
  4. or download this
         package main;
         my $args = {
    ...
            };
         my $server = Contdmon->new  ({}, $args);
         $server->Bind();
    
  5. or download this
    
    use strict;
    ...
    # so output goes to daemon immediately    
    $sock->autoflush (1);
    print $sock "What is the time, Mr Wolf?\n";