# HG changeset patch # User e085711 # Date 1317973202 -32400 # Node ID b570efb0d266d361f5131decd1fd1c0a7a51e187 # Parent 0510022e9e9239a863635901af2050d10cc9b648 modify diff -r 0510022e9e92 -r b570efb0d266 src/myVncProxy/MyRfbProto.java --- a/src/myVncProxy/MyRfbProto.java Thu Sep 22 05:20:51 2011 +0900 +++ b/src/myVncProxy/MyRfbProto.java Fri Oct 07 16:40:02 2011 +0900 @@ -361,7 +361,7 @@ case RfbProto.EncodingZRLE: case RfbProto.EncodingZRLEE: dataLen = zLen + 20; -// is.mark(dataLen); + // is.mark(dataLen); break; case RfbProto.EncodingXCursor: case RfbProto.EncodingRichCursor: @@ -383,7 +383,7 @@ regiFramebufferUpdate(); // printFramebufferUpdate(); int dataLen = checkAndMark(); - readSendData(dataLen); + readSendData(dataLen); } BufferedImage createBufferedImage(Image img) { @@ -597,7 +597,9 @@ } return len; } + + float maxMag = 1; /** * send data to clients * @param dataLen @@ -643,14 +645,24 @@ bufs.addFirst(header); multicastqueue.put(bufs); +// is.reset(); -// is.reset(); +/* + System.out.println("ZRLE = "+dataLen); + System.out.println("ZRLEE = "+(len2+20)); + float mag = (float)dataLen / (float)(len2 + 20); + System.out.println("ZRLE / ZRLEE = "+ mag); + if(mag > maxMag) maxMag = mag; + System.out.println("maxMag = "+maxMag); +*/ return ; } bufs.add(header); if (dataLen>16) { ByteBuffer b = ByteBuffer.allocate(dataLen-16); + startTiming(); readFully(b.array(),0,dataLen-16); b.limit(dataLen-16); + stopTiming(); bufs.add(b); } multicastqueue.put(bufs); diff -r 0510022e9e92 -r b570efb0d266 src/myVncProxy/VncProxyService.java --- a/src/myVncProxy/VncProxyService.java Thu Sep 22 05:20:51 2011 +0900 +++ b/src/myVncProxy/VncProxyService.java Fri Oct 07 16:40:02 2011 +0900 @@ -486,7 +486,7 @@ if (encodingsWereChanged) { try { - rfb.writeSetEncodings(encodings, nEncodings); + rfb.writeSetEncodings(encodings, nEncodings); if (vc != null) { vc.softCursorFree(); }