NAME
Test::Net::Service - test different network services
SYNOPSIS
my $net_service = Test::Net::Service->new(
'host' => 'camel.cle.sk',
'proto' => 'tcp',
);
eval {
$net_service->test(
'port' => 22,
'service' => 'ssh',
);
};
DESCRIPTION
This should a collection of basic test for network services. Check the list and the description Services.
PROPERTIES
All optional for constructor. Will be used as defaults if set.
host
socket
proto
port
service
METHODS
new()
Constructor. You set any property and it will be used as defaults for <-
test()>> method.
test()
Perform the service test. Add any additional || different parameters to the default ones as function arguments.
connect()
INTERNAL methd to connect to the host&port if needed.
Services
test_dummy()
Will aways succeed if the connection is sucesfull. Additionaly it will return hash ref of all the arguments that will be used to connect and test. Can be used when you want to always pass the test or for debugging.
test_ssh()
Will check for SSH string in the first line returned by server after connection.
test_http()
Need 'host' to be passed. Will make GET http request for this host.
Checks if the first line of the server response beginns with 'HTTP'.
test_https()
TODO
AUTHOR
Jozef Kutej