AnyEvent::Finger::Client - Simple asynchronous finger client
version 0.14
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; });
Provide a simple asynchronous finger client.
my $client = AnyEvent::Finger::Client->new(%options);
The constructor takes the following optional arguments:
The hostname to connect to.
The port to connect to.
The connection timeout.
A callback subref to be called on error (either connection or transmission error). Passes the error string as the first argument to the callback.
$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).
Graham Ollis <plicease@cpan.org>
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.