Mercurial > hg > Applications > TreeVNC
diff src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java @ 515:91f5c9dc91c8
fix
author | mir3636 |
---|---|
date | Thu, 21 Feb 2019 18:37:25 +0900 |
parents | 887ebd993b3d |
children | 1646be890954 |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Feb 21 16:52:21 2019 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Feb 21 18:37:25 2019 +0900 @@ -80,6 +80,7 @@ private FramebufferUpdateRectangle c1rect; private int c1headerPos; private boolean stopBroadcast; + public boolean multicastBlocking = true; public TreeRFBProto(boolean isTreeManager, ViewerInterface viewer) { nets.setMyRfb(this); @@ -656,7 +657,7 @@ if (encoding == EncodingType.ZRLE.getId() || encoding == EncodingType.ZLIB.getId()) { - if (true) { + if (multicastBlocking) { try { zrleeBlocking(dataLen, reader, bytes, rect, context.getPixelFormat().bitsPerPixel/8, bufs, header); } catch (DataFormatException e) { @@ -798,6 +799,7 @@ c1.putLong(counter++); c1headerPos = c1.position(); c1.put(header); + header.flip(); c1.putInt(0); } else { deflater.deflate(c1, Deflater.SYNC_FLUSH); @@ -1040,7 +1042,7 @@ public synchronized void startBroadcast(ReceiverTask receiverTask) { BroadcastRFBListener rfbBroadcastListener = viewer.getRfbBroadcastListener(); rfbBroadcastListener.init(this, receiverTask); - if (rfbBroadcastListener.isStopFlag()) { + if (!rfbBroadcastListener.isStopFlag()) { Thread rfbBroadcast = new Thread(rfbBroadcastListener, "RFBBroadcast"); rfbBroadcast.start(); }