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
The Perl Karma Client API consists of three objects: The Query, the Response and the Client. The user constructs a Query and passes it to a Client, which returns a Response.
CONSTRUCTOR
The class method new(...) constructs 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.
EXPORTS
BUGS
This document is incomplete.
SEE ALSO
Mail::Karmasphere::Query Mail::Karmasphere::Response http://www.karmasphere.com/
COPYRIGHT
Copyright (c) 2005 Shevek, Karmasphere. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.