FusionInventory::Agent::Network(3pm)

FusionInventory::Agent::Network3pm

The network abstraction layer

Overview

This module is the abstraction layer for network interaction. It uses LWP. Not like LWP, it can vlaide SSL certificat with Net::SSLGlue::LWP.

new()

The constructor. These keys are expected: config, logger, target.

        my $network = FusionInventory::Agent::Network->new ({
    
                logger => $logger,
                config => $config,
                target => $target,
    
            });
send()

Send an instance of FusionInventory::Agent::XML::Query::* to the target (the server).

getStore()

Acts like LWP::Simple::getstore.

        my $rc = $network->getStore({
                source => 'http://www.FusionInventory.org/',
                target => '/tmp/fusioinventory.html'
            });

$rc, can be read by isSuccess()

get()
        my $content = $network->get({
                source => 'http://www.FusionInventory.org/',
                timeout => 15
            });

Act like LWP::Simple::get, return the HTTP content of the URL in 'source'. The timeout is optional

isSuccess()

Wrapper for LWP::is_success;

        die unless $network->isSuccess({ code => $rc });

From fusioninventory-agent 2.0.6-2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.