Inca::Client - A perl module for defining clients of Inca servers.
use Inca::Client; my $client = new Inca::Client( host => 'localhost', port => 6362, auth => 1, cert => 'etc/mycert.pem', init => 'etc/inca.properties', key => 'etc/mykey.pem', prefix => 'inca.client.', trusted => 'etc/mycert.pem', password => '1ncaD1nkaD00' );
This module creates clients for Inca servers. It handles both unauthenticated and (where available) authenticated communication between client and server and implements methods that are supported by all Inca servers. This class will rarely be instantiated directly; more often, it will serve as the base class for other classes that communicate with particular Inca components.
Class constructor which returns a new Inca::Client object. The constructor may be called with any of the following named parameters.
A boolean value indicating whether or not the connection to the server should use certificate-based authentication. The default is false.
The path to the certificate file. Required for authenticated connections.
The IP or DNS name of the server to contact. Required.
Optional path to an Inca properties file specifying values for other parameters.
The path to the private key file. Required for authenticated connections.
The password for decripting the private key file. Required for authenticated connections.
The server port to contact. Required.
Optional prefix for properties in the init file. The constructor ignores properties that lack this prefix and strips the prefix from those that have it.
The path to the trusted ca certificate file. Required for authenticated connections.
Attempts to connect the client to the server.
Returns the server address if the client is connected, else undef.
Returns and clears any error that occurred during the most recent operation on the connection. Returns undef if no error occurred.
Retrieves and returns the contents of the server log file.
Sends the log4j settings $settings to the server and returns any successful response, which should be the empty string.
Indicates to the server that the entity identified by $dn should be permitted to perform $action. Returns any successful response, which should be the empty string.
Sends $text to the server as part of a PING message and returns any successful response, which should be the same text.
Sets the error associated with this connection to $err. Mostly for internal and derived class use.
Sends $version to the server as part of a START message and returns any successful response, which should be empty.
A convenience method for this class and derived classes. Sends $message to the server and returns any response, calling setError if the response indicates that an error occurred.
A convenience method for this class and derived classes. Reads and returns a message from the server. Returns undef on EOF.
A convenience method for this class and derived classes. Sends $message to the server.