Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 516:1646be890954
add debug code
author | mir3636 |
---|---|
date | Thu, 21 Feb 2019 19:45:56 +0900 |
parents | 91f5c9dc91c8 |
children | 8401dbe0d583 |
files | src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Thu Feb 21 18:37:25 2019 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Thu Feb 21 19:45:56 2019 +0900 @@ -26,6 +26,7 @@ // TreeVNC handling int dataLen = getZrleLength(rect, reader); reader.reset(); + System.out.println("ZRLEESender: " + rect + " length: " + dataLen); if (rfb.hasViewer()) { ZRLEDecoder decoder = new ZRLEDecoder(); if (rect.getEncodingType() == EncodingType.ZRLE) {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Feb 21 18:37:25 2019 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Feb 21 19:45:56 2019 +0900 @@ -718,6 +718,10 @@ reader.readBytes(b.array(), 0, dataLen - headerLen); b.limit(dataLen - headerLen); bufs.add(b); + byte[] bytes1 = b.array(); + int headerPos = 0; int len2 = b.limit(); + System.out.println(" bytes: " + bytes1[headerPos + 20] + ", " + bytes1[headerPos + 21] + ", " + bytes1[headerPos + 22] + ", " + bytes1[headerPos + 23]); + System.out.println(" bytes: " + bytes1[len2 - 4] + ", " + bytes1[len2 - 3] + ", " + bytes1[len2 - 2] + ", " + bytes1[len2 - 1]); } multicastqueue.put(bufs); @@ -783,6 +787,7 @@ if (c1.remaining() < span || c1rect.x + c1rect.width + tilex >= rect.x + rect.width ) { deflater.deflate(c1, Deflater.FULL_FLUSH); c1.flip(); + System.out.println("multicastPut: " + c1rect + " length: " + c1.remaining()); try { writeUpdateRectangleWithHeader(c1, c1headerPos, c1.remaining(), c1rect.x, c1rect.y, c1rect.width, c1rect.height); } catch (InterruptedException e) { @@ -815,7 +820,6 @@ c1.putShort(headerPos + 6,(short) y); c1.putShort(headerPos + 8,(short) w); c1.putShort(headerPos + 10,(short) h); - c1.flip(); LinkedList<ByteBuffer> bufs = new LinkedList<ByteBuffer>(); bufs.add(c1); if (isTreeManager && connectionPresenter.isUseMulticast()) { @@ -823,6 +827,9 @@ viewer.getRfbBroadcastListener().multicastUpdateRectangle(buf); } else multicastqueue.waitput(bufs); + byte[] bytes = c1.array(); + System.out.println(" bytes: " + bytes[headerPos + 20] + ", " + bytes[headerPos + 21] + ", " + bytes[headerPos + 22] + ", " + bytes[headerPos + 23]); + System.out.println(" bytes: " + bytes[len2 - 4] + ", " + bytes[len2 - 3] + ", " + bytes[len2 - 2] + ", " + bytes[len2 - 1]); } public LinkedList<ByteBuffer> createCheckDelayHeader(LinkedList<ByteBuffer> checkDelay, ByteBuffer header) {