|<B>new (%args)B>||Creates a new ping handle.|
|<B>auto_timeout ($timeout)B>||This method enables automatic connection timeout of new connections. It calls enable_timeout (see below) for every new connection that was connected and emitted a stream_ready event.|
|<B>enable_timeout ($con, B>$timeout<B>)B>||
This enables a periodical ping on the connection $con.
$timeout must be the seconds that the ping intervals last.
If the server which is connected via $con didnt respond within $timeout seconds the connection $con will be disconnected.
Please note that there already is a basic timeout mechanism for dead TCP connections in AnyEvent::XMPP::Connection, see also the whitespace_ping_interval configuration variable for a connection there. It then will depend on TCP timeouts to disconnect the connection.
Use enable_timeout and auto_timeout only if you really feel like you need an explicit timeout for your connections.
|<B>ping ($con, B>$dest<B>, B>$cb<B>, B>$timeout<B>)B>||This method sends a ping request to $dest via the AnyEvent::XMPP::Connection in $con. If $dest is undefined the ping will be sent to the connected server. $cb will be called when either the ping timeouts, an error occurs or the ping result was received. $timeout is an optional timeout for the ping request, if $timeout is not given the default IQ timeout for the connection is the relevant timeout.|
|<B>ignore_pings ($bool)B>||This method is mostly for testing, it tells this extension to ignore all ping requests and will prevent any response from being sent.|
Robin Redeker, <elmex at ta-sa.org>, JID: <elmex at jabber.org>
Copyright 2007, 2008 Robin Redeker, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||ANYEVENT::XMPP::EXT::PING (3)||2012-12-25|