NAME

Mail::Karmasphere::Client - client for Karmasphere Reputation Server

SYNOPSIS

use Mail::Karmasphere::Client qw(:all);
my $client = new Mail::Karmasphere::Client(
		PeerAddr	=> '123.45.6.7',
		PeerPort	=> 8666,
			);
my $query = new Mail::Karmasphere::Query();
$query->identity('123.45.6.7', IDT_IP4_ADDRESS);
$query->combiner('karmasphere.emailchecker');
my $response = $client->ask($query);
print $response->as_string;

my $response = $client->query(...);

DESCRIPTION

CONSTRUCTOR

The class method new(...) onstructs a new Client object. All arguments are optional. The following parameters are recognised as arguments to new():

PeerAddr

The IP address or hostname to contact. See IO::Socket::INET. The default is 'slave.karmasphere.com'.

PeerPort

The TCP or UDP to contact. See IO::Socket::INET. The default is 8666.

Proto

Either 'udp' or 'tcp'. The default is 'udp' because it is faster.

Debug

Set to 1 to enable some wire-level debugging.

METHODS

$response = $client->ask($query)

Returns a Mail::Karmasphere::Response to a Mail::Karmasphere::Query.

$response = $client->query(...)

A convenience method, equivalent to

$client->ask(new Mail::Karmasphere::Query(...);

See Mail::Karmasphere::Query for more details.

BUGS

This document is incomplete.

SEE ALSO

Mail::Karmasphere::Query Mail::Karmasphere::Response http://www.karmasphere.com/