mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
SMACK-412 Split the ping implementation to a server ping to replace keepalive and a simplified ping manager for manual pings of other entities.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13569 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
a55b54f20b
commit
aab1dcdabe
19 changed files with 749 additions and 651 deletions
|
@ -58,11 +58,6 @@ public final class SmackConfiguration {
|
|||
private static int localSocks5ProxyPort = 7777;
|
||||
private static int packetCollectorSize = 5000;
|
||||
|
||||
/**
|
||||
* defaultPingInterval (in seconds)
|
||||
*/
|
||||
private static int defaultPingInterval = 1800; // 30 min (30*60)
|
||||
|
||||
/**
|
||||
* This automatically enables EntityCaps for new connections if it is set to true
|
||||
*/
|
||||
|
@ -117,9 +112,6 @@ public final class SmackConfiguration {
|
|||
else if (parser.getName().equals("packetCollectorSize")) {
|
||||
packetCollectorSize = parseIntProperty(parser, packetCollectorSize);
|
||||
}
|
||||
else if (parser.getName().equals("defaultPingInterval")) {
|
||||
defaultPingInterval = parseIntProperty(parser, defaultPingInterval);
|
||||
}
|
||||
else if (parser.getName().equals("autoEnableEntityCaps")) {
|
||||
autoEnableEntityCaps = Boolean.parseBoolean(parser.nextText());
|
||||
}
|
||||
|
@ -319,24 +311,6 @@ public final class SmackConfiguration {
|
|||
SmackConfiguration.localSocks5ProxyPort = localSocks5ProxyPort;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default ping interval (seconds)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static int getDefaultPingInterval() {
|
||||
return defaultPingInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default ping interval (seconds). Set it to '-1' to disable the periodic ping
|
||||
*
|
||||
* @param defaultPingInterval
|
||||
*/
|
||||
public static void setDefaultPingInterval(int defaultPingInterval) {
|
||||
SmackConfiguration.defaultPingInterval = defaultPingInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Entity Caps are enabled as default for every new connection
|
||||
* @return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue