# HG changeset patch # User anatofuz # Date 1582188504 -32400 # Node ID 705fd8d79378d5ab188c10af24c4a9c5b698eb53 # Parent e986dad886922c7ea0ec1c30404c44b529a69a26 correct multicast flag handling diff -r e986dad88692 -r 705fd8d79378 src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java --- 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; diff -r e986dad88692 -r 705fd8d79378 src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java --- 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); diff -r e986dad88692 -r 705fd8d79378 src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java --- 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);