POE::Component::Client::Ping 1.13
Sponsored Links
POE::Component::Client::Ping 1.13 Ranking & Summary
File size:
0.013 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
921
Date added:
2007-04-17
Publisher:
Rocco Caputo
POE::Component::Client::Ping 1.13 description
POE::Component::Client::Ping is a non-blocking ICMP ping client.
SYNOPSIS
use POE qw(Component::Client::Ping);
POE::Component::Client::Ping->spawn(
Alias => "pingthing", # defaults to "pinger"
Timeout => 10, # defaults to 1 second
Retry => 3, # defaults to 1 attempt
OneReply => 1, # defaults to disabled
Parallelism => 20, # defaults to undef
BufferSize => 65536, # defaults to undef
AlwaysDecodeAddress => 1, # defaults to 0
);
sub some_event_handler {
$kernel->post(
"pingthing", # Post the request to the "pingthing" component.
"ping", # Ask it to "ping" an address.
"pong", # Have it post an answer as a "pong" event.
$address, # This is the address we want to ping.
$timeout, # Optional timeout. It overrides the default.
$retry, # Optional retries. It overrides the default.
);
}
# This is the sub which is called when the session receives a "pong"
# event. It handles responses from the Ping component.
sub got_pong {
my ($request, $response) = @_[ARG0, ARG1];
my ($req_address, $req_timeout, $req_time) = @$request;
my ($resp_address, $roundtrip_time, $resp_time, $resp_ttl) = @$response;
# The response address is defined if this is a response.
if (defined $resp_address) {
printf(
"ping to %-15.15s at %10d. pong from %-15.15s in %6.3f sn",
$req_address, $req_time,
$resp_address, $roundtrip_time,
);
return;
}
# Otherwise the timeout period has ended.
printf(
"ping to %-15.15s is done.n", $req_address,
);
}
or
use POE::Component::Client::Ping ":const";
# Post an array ref as the callback to get data back to you
$kernel->post("pinger", "ping", [ "pong", $user_data ]);
# use the REQ_USER_ARGS constant to get to your data
sub got_pong {
my ($request, $response) = @_[ARG0, ARG1];
my $user_data = $request->[REQ_USER_ARGS];
...;
}
SYNOPSIS
use POE qw(Component::Client::Ping);
POE::Component::Client::Ping->spawn(
Alias => "pingthing", # defaults to "pinger"
Timeout => 10, # defaults to 1 second
Retry => 3, # defaults to 1 attempt
OneReply => 1, # defaults to disabled
Parallelism => 20, # defaults to undef
BufferSize => 65536, # defaults to undef
AlwaysDecodeAddress => 1, # defaults to 0
);
sub some_event_handler {
$kernel->post(
"pingthing", # Post the request to the "pingthing" component.
"ping", # Ask it to "ping" an address.
"pong", # Have it post an answer as a "pong" event.
$address, # This is the address we want to ping.
$timeout, # Optional timeout. It overrides the default.
$retry, # Optional retries. It overrides the default.
);
}
# This is the sub which is called when the session receives a "pong"
# event. It handles responses from the Ping component.
sub got_pong {
my ($request, $response) = @_[ARG0, ARG1];
my ($req_address, $req_timeout, $req_time) = @$request;
my ($resp_address, $roundtrip_time, $resp_time, $resp_ttl) = @$response;
# The response address is defined if this is a response.
if (defined $resp_address) {
printf(
"ping to %-15.15s at %10d. pong from %-15.15s in %6.3f sn",
$req_address, $req_time,
$resp_address, $roundtrip_time,
);
return;
}
# Otherwise the timeout period has ended.
printf(
"ping to %-15.15s is done.n", $req_address,
);
}
or
use POE::Component::Client::Ping ":const";
# Post an array ref as the callback to get data back to you
$kernel->post("pinger", "ping", [ "pong", $user_data ]);
# use the REQ_USER_ARGS constant to get to your data
sub got_pong {
my ($request, $response) = @_[ARG0, ARG1];
my $user_data = $request->[REQ_USER_ARGS];
...;
}
POE::Component::Client::Ping 1.13 Screenshot
Advertisements
POE::Component::Client::Ping 1.13 Keywords
POE
ICMP
Ping 1.13
15.15s
defaults to
ping client
icmp ping
ping
address
req
defaults
pong
post
POE::Component::Client::Ping
POEComponentClientPing
POE::Component::Client::Ping 1.13
Bookmark POE::Component::Client::Ping 1.13
POE::Component::Client::Ping 1.13 Copyright
WareSeeker periodically updates pricing and software information of POE::Component::Client::Ping 1.13 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of POE::Component::Client::Ping 1.13 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
POE::Component::Client::SMTP is a Perl module for asynchronous mail sending with POE. Free Download
POE::Component::Client::Rcon is an implementation of the Rcon remote console protocol. Free Download
POE::Component::Client::AirTunes is a Perl module with stream music to Airport Express. Free Download
POE::Component::Client::FTP is a Perl module that implements an FTP client POE Component. Free Download
POE::Component::Client::HTTP is a HTTP user-agent component. Free Download
POE::Component::Client::TCPMulti is a high performance client TCP library. Free Download
POE::Component::Client::Halo is an implementation of the Halo query protocol. Free Download
POE::Component::Enc::Mp3 is a mp3 encoder wrapper. Free Download
Latest Software
Popular Software
Favourite Software