Steffen Ullrich > Net-Inspect-0.27 > Net::Inspect::Connection

Download:
Net-Inspect-0.27.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Net-Inspect-0.304

NAME ^

Net::Inspect::Connection - base class for connections

SYNOPSIS ^

    package Net::Inspect::L7::HTTP;
    use base 'Net::Inspect::Connection';

    sub in {
        my ($self,$dir,$data,$eof,$time) = @_;
        # expire after 2 hours inactivity
        $self->{expire} = $time + 7200; 
        ...
    }

DESCRIPTION ^

Net::Inspect::Connection provides a field expire, which should be set to the time, when the connection can expire, even if not explicitly closed.

It provides a function which will be regularly called from Net::Inspect::L4::TCP and Net::Inspect::L4::UDP on all known connections and if it returns true the connection will be deleted.

syntax highlighting: