diff src/myVncProxy/MyRfbProto.java @ 67:f695bc56eb4f

add OptionNoFrame.java. add setEncodings.
author e085711
date Tue, 26 Jul 2011 15:51:19 +0900
parents 7632606406cb
children bf5ac06df675 6e703f1000e7
line wrap: on
line diff
--- a/src/myVncProxy/MyRfbProto.java	Tue Jul 26 13:03:08 2011 +0900
+++ b/src/myVncProxy/MyRfbProto.java	Tue Jul 26 15:51:19 2011 +0900
@@ -325,6 +325,34 @@
 		if (encoding == 16)
 			zLen = readU32();
 		reset();
+/*
+		int dataLen;
+		switch (encoding) {
+		case RfbProto.EncodingRaw:
+			dataLen = rectW * rectH * 4 + 16;
+			mark(dataLen);
+			break;
+		case RfbProto.EncodingCopyRect:
+			dataLen = 16 + 4;
+			mark(dataLen);
+			break;
+		case RfbProto.EncodingRRE:
+		case RfbProto.EncodingCoRRE:
+		case RfbProto.EncodingHextile:
+			
+		case RfbProto.EncodingZlib:
+		case RfbProto.EncodingTight:
+		case RfbProto.EncodingZRLE:
+			dataLen = zLen + 20;
+			mark(dataLen);
+			break;
+		default:
+			dataLen = 1000000;
+			mark(dataLen);
+		}
+	
+*/	
+	
 	}
 
 	int checkAndMark() throws IOException {
@@ -334,6 +362,15 @@
 			dataLen = rectW * rectH * 4 + 16;
 			mark(dataLen);
 			break;
+		case RfbProto.EncodingCopyRect:
+			dataLen = 16 + 4;
+			mark(dataLen);
+			break;
+		case RfbProto.EncodingRRE:
+		case RfbProto.EncodingCoRRE:
+		case RfbProto.EncodingHextile:
+		case RfbProto.EncodingZlib:
+		case RfbProto.EncodingTight:
 		case RfbProto.EncodingZRLE:
 			dataLen = zLen + 20;
 			mark(dataLen);