From ed84b4a8b3cf1a9c2db58518f2551699713a7503 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 15 Jan 2015 16:11:49 +0100 Subject: [PATCH] Add javadoc to and fix typo in XMPPTCPConnection --- .../smack/tcp/XMPPTCPConnection.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index 2a2ec2cfa..8bf7e8d24 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -147,8 +147,12 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { */ private boolean disconnectedButResumeable = false; - // socketClosed is used concurrent - // by XMPPTCPConnection, PacketReader, PacketWriter + /** + * Flag to indicate if the socket was closed intentionally by Smack. + *

+ * This boolean flag is used concurrently, therefore it is marked volatile. + *

+ */ private volatile boolean socketClosed = false; private boolean usingTLS = false; @@ -209,6 +213,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { */ private boolean useSm = useSmDefault; private boolean useSmResumption = useSmResumptionDefault; + + /** + * The counter that the server sends the client about it's current height. For example, if the server sends + * {@code }, then this will be set to 42 (while also handling the {@link #unacknowledgedStanzas} queue). + */ private long serverHandledStanzasCount = 0; /** @@ -221,6 +230,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { *

*/ private long clientHandledStanzasCount = 0; + private BlockingQueue unacknowledgedStanzas; /** @@ -1043,7 +1053,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { } smServerMaxResumptimTime = enabled.getMaxResumptionTime(); } else { - // Mark this a aon-resumable stream by setting smSessionId to null + // Mark this a non-resumable stream by setting smSessionId to null smSessionId = null; } clientHandledStanzasCount = 0;