Mercurial > hg > Members > nobuyasu > tightVNCClient
changeset 5:bdb8d7c7d4d1
update version0.1
author | e085711 |
---|---|
date | Fri, 15 Apr 2011 18:31:12 +0900 |
parents | 60a87e277536 |
children | b593d6ff5a46 |
files | src/RfbProto.java src/VncCanvas.java src/ZlibInStream.java |
diffstat | 3 files changed, 38 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/RfbProto.java Wed Apr 13 08:00:53 2011 +0900 +++ b/src/RfbProto.java Fri Apr 15 18:31:12 2011 +0900 @@ -654,6 +654,8 @@ } } + System.out.println("msgType"+msgType); + return msgType; } @@ -666,8 +668,8 @@ void readFramebufferUpdate() throws IOException { skipBytes(1); updateNRects = readU16(); - // System.out.println(updateNRects); - + System.out.println("updateRects"+updateNRects); + // If the session is being recorded: if (rec != null) { rec.writeByte(FramebufferUpdate); @@ -688,7 +690,11 @@ updateRectW = readU16(); updateRectH = readU16(); updateRectEncoding = readU32(); - // System.out.println("readU16&32"); + System.out.println("updateRectX="+updateRectX); + System.out.println("updateRectY="+updateRectY); + System.out.println("updateRectW="+updateRectW); + System.out.println("updateRectH="+updateRectH); + System.out.println("updateRecEncoding="+updateRectEncoding); if (updateRectEncoding == EncodingZlib || updateRectEncoding == EncodingZRLE @@ -1353,5 +1359,14 @@ numBytesRead += 4; return r; } + void mark(int len) throws IOException{ + is.mark(len); + } + void reset() throws IOException{ + is.reset(); + } + final boolean markSupported() { + return is.markSupported(); + } }
--- a/src/VncCanvas.java Wed Apr 13 08:00:53 2011 +0900 +++ b/src/VncCanvas.java Fri Apr 15 18:31:12 2011 +0900 @@ -380,15 +380,29 @@ long count = 0; while (true) { + System.out.println("\ncount=" + count); - System.out.println("\ncount=" + count); + +/* + int nBytes = 0; + rfb.mark(20); + int messageType = rfb.readU8(); + System.out.println("rfb.available()=" + rfb.available()); + System.out.println("messageType="+messageType); + + rfb.skipBytes(15); +// rfb.skipBytes(16); + nBytes = rfb.readU32(); + System.out.println("nBytes="+nBytes); + rfb.reset(); +*/ + count++; - System.out.println("rfb.available()=" + rfb.available()); - while (rfb.available() == 0) - continue; // Read message type from the server. int msgType = rfb.readServerMessageType(); + int len = rfb.available(); + System.out.println("rfb.available()=" + len); // Process the message depending on its type. switch (msgType) { @@ -475,7 +489,7 @@ throw new Exception("Unknown RFB rectangle encoding " + rfb.updateRectEncoding); } - + rfb.stopTiming(); statNumPixelRects++;
--- a/src/ZlibInStream.java Wed Apr 13 08:00:53 2011 +0900 +++ b/src/ZlibInStream.java Fri Apr 15 18:31:12 2011 +0900 @@ -96,7 +96,6 @@ inflater.setInput(underlying.getbuf(), underlying.getptr(), avail_in); } - int n = inflater.inflate(b, end, bufSize - end); end += n; if (inflater.needsInput()) { @@ -110,7 +109,7 @@ private InStream underlying; private int bufSize; - private int ptrOffset; + private int ptrOffset; private java.util.zip.Inflater inflater; private int bytesIn; }