SYNOPSIS

   use POE::Component::Client::Ident;

my $poco_obj = POE::Component::Client::Ident->spawn ( 'Ident-Client' );

$kernel->post ( 'Ident-Client' => query => Socket => $socket );

$kernel->post ( 'Ident-Client' => query => PeerAddr => '10.0.0.1', PeerPort => 2345, SockAddr => '192.168.1.254', SockPort => 6669, BuggyIdentd => 1, TimeOut => 30 );

DESCRIPTION

POE::Component::Client::Ident is a \s-1POE\s0 component that provides non-blocking Ident lookup services to other components and sessions. The Ident protocol is described in \s-1RFC\s0 1413 <http://www.faqs.org/rfcs/rfc1413.html>.

The component takes requests in the form of events, spawns POE::Component::Client::Ident::Agent sessions to perform the Ident queries and returns the appropriate responses to the requesting session.

CONSTRUCTOR

spawn

Takes one argument, a kernel alias to christen the new component with. Returns an object.

METHODS

These methods are available on the poco object returned by spawn().

session_id

Returns the component's session \s-1ID\s0.

shutdown

Takes no arguments. Causes the component to terminate gracefully. Any pending Ident::Agent components that are running will be closed without returning events.

INPUT

The component accepts the following events:

query

Takes either the arguments: "PeerAddr", the remote IP address where a TCP connection has originated; "PeerPort", the port where the TCP has originated from; "SockAddr", the address of our end of the connection; "SockPort", the port of our end of the connection; \s-1OR:\s0 "Socket", the socket handle of the connection, the component will work out all the details for you. If Socket is defined, it will override the settings of the other arguments. See the documentation for Ident-Agent for extra parameters you may pass.

shutdown

Takes no arguments. Causes the component to terminate gracefully. Any pending Ident::Agent components that are running will be closed without returning events.

OUTPUT

The events you can expect to receive having submitted a 'query'.

All the events returned by the component have a hashref as \s-1ARG0\s0. This hashref contains the arguments that were passed to the component. If a socket handle was passed, the hashref will contain the appropriate PeerAddr, PeerPort, SockAddr and Sock Port.

ident_client_reply

Returned when the component receives a \s-1USERID\s0 response from the identd. \s-1ARG0\s0 is hashref, \s-1ARG1\s0 is the opsys field and \s-1ARG2\s0 is the userid or something else depending on whether the opsys field is set to '\s-1OTHER\s0' ( Don't blame me, read the \s-1RFC\s0 ).

ident_client_error

Returned when the component receives an \s-1ERROR\s0 response from the identd, there was some sort of communication error with the remote host ( ie. no identd running ) or it had some other problem with making the connection to the other host. No matter. \s-1ARG0\s0 is hashref, \s-1ARG1\s0 is the type of error.

AUTHOR

Chris Williams, <[email protected]<gt>

RELATED TO POE::Component::Client::Ident…

\s-1RFC\s0 1413 <http://www.faqs.org/rfcs/rfc1413.html>

POE::Component::Client::Ident::Agent