FusionInventory::Agent::Network(3pm)

NAME

FusionInventory::Agent::Network - the Network abstraction layer

DESCRIPTION

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 });
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout