Mercurial > hg > Applications > TreeVNC
changeset 610:705fd8d79378
correct multicast flag handling
author | anatofuz |
---|---|
date | Thu, 20 Feb 2020 17:48:24 +0900 |
parents | e986dad88692 |
children | 9a2bef3f3020 |
files | src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java |
diffstat | 3 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Wed Feb 19 16:52:04 2020 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Thu Feb 20 17:48:24 2020 +0900 @@ -432,9 +432,16 @@ } } + static public boolean multiasting = false; + public void handleMulticastFrameBufferUpdate(ByteBuffer c1) { FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle(); Reader in = new Reader(new ByteArrayInputStream(c1.array())); + + if (!multiasting) { + System.out.println("broadcasting!"); + multiasting = true; + } try { if (getMessageId(in) != FRAMEBUFFER_UPDATE) { return;
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Wed Feb 19 16:52:04 2020 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Feb 20 17:48:24 2020 +0900 @@ -697,6 +697,12 @@ } // ZRLEE is already compressed + if (rect.getEncodingType() == EncodingType.ZRLEE) { + if (ReceiverTask.multiasting) { + System.out.println("multicasting "); + ReceiverTask.multiasting = false; + } + } bufs.add(header); if (addSerialNum) { this.addSerialNumber(bufs);
--- a/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Wed Feb 19 16:52:04 2020 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java Thu Feb 20 17:48:24 2020 +0900 @@ -46,6 +46,7 @@ // start treeManager only ( -p flag ) // Viewer vps = new VncProxyService(); Viewer vps = new Viewer(); + vps.setUseMulticast(useMulticast); if(fixingSizeDisplay) setFixingSizeDisplay(vps); rootStart(args,vps);