initial support for ClientRedirect and VeNCrypt sub-type Ident in java viewer
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4489 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/src/com/tigervnc/rfb/CMsgReaderV3.java b/java/src/com/tigervnc/rfb/CMsgReaderV3.java
index 308d60d..6d9e254 100644
--- a/java/src/com/tigervnc/rfb/CMsgReaderV3.java
+++ b/java/src/com/tigervnc/rfb/CMsgReaderV3.java
@@ -80,6 +80,9 @@
case Encodings.pseudoEncodingLastRect:
nUpdateRectsLeft = 1; // this rectangle is the last one
break;
+ case Encodings.pseudoEncodingClientRedirect:
+ readClientRedirect(x, y, w, h);
+ break;
default:
readRect(new Rect(x, y, x+w, y+h), encoding);
break;
@@ -133,6 +136,19 @@
handler.setExtendedDesktopSize(x, y, w, h, layout);
}
+ void readClientRedirect(int x, int y, int w, int h)
+ {
+ int port = is.readU16();
+ String host = is.readString();
+ String x509subject = is.readString();
+
+ if (x != 0 || y != 0 || w != 0 || h != 0) {
+ vlog.error("Ignoring ClientRedirect rect with non-zero position/size");
+ } else {
+ handler.clientRedirect(port, host, x509subject);
+ }
+ }
+
int nUpdateRectsLeft;
static LogWriter vlog = new LogWriter("CMsgReaderV3");