Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 522:6677ce2c7017
stop frame buffer multicast listenner
author | mir3636 |
---|---|
date | Fri, 22 Feb 2019 19:53:15 +0900 |
parents | 3fc0fedbc3fd |
children | dca83cc39438 |
files | Todo.txt src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java |
diffstat | 3 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Todo.txt Fri Feb 22 16:07:03 2019 +0900 +++ b/Todo.txt Fri Feb 22 19:53:15 2019 +0900 @@ -1,3 +1,10 @@ +Fri Feb 22 19:12:24 JST 2019 + マルチキャストとストリームを混在させる + WhereToConnectMessage にマルチキャストのフラグを用意する + ストリームなノードはツリーのルートの近い方にまとめる + あるところより下はマルチキャストしかいないのでフレームアップデートを流さない + 親ノードに接続する際に自分がマルチキャストかどうかを申告する + Tue Feb 19 15:01:43 JST 2019 マルチキャスト用のパラメーター Packet size
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Fri Feb 22 16:07:03 2019 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Fri Feb 22 19:53:15 2019 +0900 @@ -141,7 +141,8 @@ serverCutText(); break; default: - logger.severe("Unsupported server message. Id = " + messageId); + logger.fine("Unsupported server message. Id = " + messageId); + continue; } } catch (TransportException e) { System.out.println(e.getMessage()); @@ -243,8 +244,13 @@ try { reader.readByte(); // padding this.numberOfRectangles = reader.readUInt16(); - if(numberOfRectangles != 1) + if(numberOfRectangles > 2) { System.out.println("numberofrectangle : " + numberOfRectangles); + if (rfb.getViewer().getUseMulticast()){ + + return; // Discard invalid packet + } + } while (numberOfRectangles-- > 0) { FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle(); rect.fill(reader);
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Fri Feb 22 16:07:03 2019 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Fri Feb 22 19:53:15 2019 +0900 @@ -1068,7 +1068,7 @@ public synchronized void startBroadcast(ReceiverTask receiverTask) { BroadcastRFBListener rfbBroadcastListener = viewer.getRfbBroadcastListener(); rfbBroadcastListener.init(this, receiverTask); - if (!rfbBroadcastListener.isStopFlag()) { + if (!isTreeManager && !rfbBroadcastListener.isStopFlag()) { Thread rfbBroadcast = new Thread(rfbBroadcastListener, "RFBBroadcast"); rfbBroadcast.start(); }