The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

AnyEvent::Finger::Client - Simple asynchronous finger client

VERSION

version 0.14

SYNOPSIS

 use AnyEvent;
 use AnyEvent::Finger::Client;
 
 my $done = AnyEvent->condvar;
 
 my $client = AnyEvent::Finger::Client->new(
   hostname => 'localhost',
 );
 
 $client->finger('username', sub {
   my($lines) = @_;
   print "[response]\n";
   print join "\n", @$lines;
 }, on_error => sub {
   print STDERR shift;
 });

DESCRIPTION

Provide a simple asynchronous finger client.

CONSTRUCTOR

 my $client = AnyEvent::Finger::Client->new(%options);

The constructor takes the following optional arguments:

  • hostname (default 127.0.0.1)

    The hostname to connect to.

  • port (default 79)

    The port to connect to.

  • timeout (default 60)

    The connection timeout.

  • on_error (carp error)

    A callback subref to be called on error (either connection or transmission error). Passes the error string as the first argument to the callback.

METHODS

finger

 $client->finger($request, $callback, [ \%options ])

Connect to the finger server make the given request and call the given callback when the response is complete. The response will be passed to the callback as an array reference of lines. Each line will have the new line (\n or \r or \r\n) removed. Any of the arguments passed into the constructor as passed above may be overridden specifying them in the options hash (third argument).

SEE ALSO

AnyEvent::Finger
AnyEvent::Server

AUTHOR

Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012-2022 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.