GUACAMOLE-422: Add getter for retrieving the protocol version negotiated by ConfiguredGuacamoleSocket.
diff --git a/guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java b/guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java
index be755f4..fe4efca 100644
--- a/guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java
+++ b/guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java
@@ -253,6 +253,20 @@
return id;
}
+ /**
+ * Returns the version of the Guacamole protocol associated with the
+ * Guacamole connection negotiated by this ConfiguredGuacamoleSocket. This
+ * version is the lowest version common to both ConfiguredGuacamoleSocket
+ * and the relevant Guacamole proxy instance (guacd).
+ *
+ * @return
+ * The protocol version that this ConfiguredGuacamoleSocket will use to
+ * communicate with guacd.
+ */
+ public GuacamoleProtocolVersion getProtocolVersion() {
+ return protocolVersion;
+ }
+
@Override
public GuacamoleWriter getWriter() {
return socket.getWriter();