Mercurial > hg > Applications > TreeVNC
diff src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java @ 240:7310e7d7a45f
add option --checkDelay.
author | oc |
---|---|
date | Sun, 12 Oct 2014 23:05:47 +0900 |
parents | d655db005535 |
children | b21a7842a41d |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Sat Oct 11 23:46:22 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Sun Oct 12 23:05:47 2014 +0900 @@ -63,9 +63,8 @@ private TreeVncRootSelectionPanel rootSelectionPanel; private boolean isTreeManager; private String vncInterface; - private int i; public LinkedList<TreeVNCNode> nodeList; - private SendCheckDelay sendCheckDelay; + public boolean checkDelay = false; public TreeRFBProto(boolean isTreeManager) { @@ -182,7 +181,8 @@ String address = new String(byteAddress, "UTF-8"); int nodeNum = getNodeNum(port, address); Long delay = System.currentTimeMillis() - time; - System.out.println("nodeNum" + nodeNum + ", delay = " + delay); + double db = (double) delay / 2; + System.out.println("nodeNum" + nodeNum + ", delay = " + db); // checkNodeNum(); // readSendData(check); @@ -573,21 +573,6 @@ if (header.get(0) == FramebufferUpdate) { int encoding = header.getInt(12); -// sendCheckDelay.run(); - - - /* - if(isTreeManager()) { - if (i%20 == 0) { - LinkedList<ByteBuffer> checkdelay = new LinkedList<ByteBuffer>(); - long time = System.currentTimeMillis(); - checkdelay.add(new CheckDelay(0, 0, 0, 0, time, EncodingType.CHECK_DELAY).getMessage()); - this.addSerialNumber(checkdelay); - multicastqueue.put(checkdelay); - } i++; - } - */ - if (encoding == EncodingType.ZRLE.getId() || encoding == EncodingType.ZLIB.getId()) { // recompress into ZREE @@ -760,7 +745,11 @@ } public void setShowTree(boolean showTree) { - showTreeNode = showTree; + this.showTreeNode = showTree; + } + + public void setCheckDelay(boolean checkDelay) { + this.checkDelay = checkDelay; } public int getNodeNum(int port, String address) { @@ -775,4 +764,4 @@ } return nodeNum; } -} +} \ No newline at end of file