Mercurial > hg > Members > nobuyasu > tightVNCProxy
changeset 156:b570efb0d266
modify
author | e085711 |
---|---|
date | Fri, 07 Oct 2011 16:40:02 +0900 |
parents | 0510022e9e92 |
children | 881e5b87ee42 |
files | src/myVncProxy/MyRfbProto.java src/myVncProxy/VncProxyService.java |
diffstat | 2 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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(); }