Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 436:9db8862ef200
remove unsed code in FindRoot
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 Jun 2016 09:23:38 +0900 |
parents | 4ac83ab4be81 |
children | 345c92f0b67d |
files | .idea/workspace.xml src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java |
diffstat | 3 files changed, 91 insertions(+), 231 deletions(-) [+] |
line wrap: on
line diff
--- a/.idea/workspace.xml Sun Jun 12 09:06:53 2016 +0900 +++ b/.idea/workspace.xml Sun Jun 12 09:23:38 2016 +0900 @@ -1,11 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ChangeListManager"> - <list default="true" id="8c014d34-63b7-4e87-8d9c-e9f73c2c3803" name="Default" comment=""> - <change type="DELETED" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/RequestSingleDisplaySize.java" afterPath="" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/client/ClientToServerMessage.java" afterPath="$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/client/ClientToServerMessage.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" afterPath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" /> + <list default="true" id="8c014d34-63b7-4e87-8d9c-e9f73c2c3803" name="Default" comment="remove unsed code in FindRoot "> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> </list> @@ -48,8 +45,8 @@ <file leaf-file-name="TreeRFBProto.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-23.733334"> - <caret line="261" column="69" selection-start-line="261" selection-start-column="69" selection-end-line="261" selection-end-column="69" /> + <state vertical-scroll-proportion="367.73334"> + <caret line="94" column="26" selection-start-line="94" selection-start-column="26" selection-end-line="94" selection-end-column="26" /> <folding> <element signature="imports" expanded="true" /> <element signature="e#12298#12624#0" expanded="true" /> @@ -69,10 +66,10 @@ </provider> </entry> </file> - <file leaf-file-name="SwingViewerWindow.java" pinned="false" current-in-tab="true"> + <file leaf-file-name="SwingViewerWindow.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.4284546"> + <state vertical-scroll-proportion="0.0"> <caret line="908" column="45" selection-start-line="908" selection-start-column="45" selection-end-line="908" selection-end-column="45" /> <folding> <element signature="e#0#45693#0" expanded="true" /> @@ -85,20 +82,20 @@ <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0"> - <caret line="39" column="19" selection-start-line="39" selection-start-column="19" selection-end-line="39" selection-end-column="19" /> + <caret line="27" column="47" selection-start-line="27" selection-start-column="47" selection-end-line="27" selection-end-column="47" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="TreeRootFinderListener.java" pinned="false" current-in-tab="false"> + <file leaf-file-name="TreeRootFinderListener.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-19.266666"> - <caret line="63" column="45" selection-start-line="63" selection-start-column="45" selection-end-line="63" selection-end-column="45" /> + <state vertical-scroll-proportion="0.3846154"> + <caret line="61" column="0" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" /> <folding> - <element signature="e#3076#3077#0" expanded="true" /> - <element signature="e#3098#3099#0" expanded="true" /> + <element signature="e#2852#2853#0" expanded="true" /> + <element signature="e#2874#2875#0" expanded="true" /> </folding> </state> </provider> @@ -108,26 +105,8 @@ <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0"> - <caret line="43" column="59" selection-start-line="43" selection-start-column="59" selection-end-line="43" selection-end-column="59" /> - <folding> - <element signature="imports" expanded="false" /> - <element signature="e#1886#1887#0" expanded="false" /> - <element signature="e#1913#1914#0" expanded="false" /> - <element signature="e#1941#1942#0" expanded="false" /> - <element signature="e#1974#1975#0" expanded="false" /> - <element signature="e#2009#2010#0" expanded="false" /> - <element signature="e#2040#2041#0" expanded="false" /> - <element signature="e#2073#2074#0" expanded="false" /> - <element signature="e#2095#2096#0" expanded="false" /> - <element signature="e#2127#2128#0" expanded="false" /> - <element signature="e#2149#2150#0" expanded="false" /> - <element signature="e#2185#2186#0" expanded="false" /> - <element signature="e#2213#2214#0" expanded="false" /> - <element signature="e#2248#2249#0" expanded="false" /> - <element signature="e#2273#2274#0" expanded="false" /> - <element signature="e#2312#2313#0" expanded="false" /> - <element signature="e#2327#2328#0" expanded="false" /> - </folding> + <caret line="24" column="32" selection-start-line="24" selection-start-column="32" selection-end-line="24" selection-end-column="32" /> + <folding /> </state> </provider> </entry> @@ -439,11 +418,11 @@ <option value="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java" /> <option value="$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/state/InitState.java" /> <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncRootSelectionPanel.java" /> - <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java" /> - <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java" /> <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" /> <option value="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" /> <option value="$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/client/ClientToServerMessage.java" /> + <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java" /> + <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java" /> </list> </option> </component> @@ -1050,7 +1029,13 @@ <option name="project" value="LOCAL" /> <updated>1465652578794</updated> </task> - <option name="localTasksCounter" value="4" /> + <task id="LOCAL-00004" summary="find our screen on fitScreen remove requestSingleScreenSize "> + <created>1465690013153</created> + <option name="number" value="00004" /> + <option name="project" value="LOCAL" /> + <updated>1465690013153</updated> + </task> + <option name="localTasksCounter" value="5" /> <servers /> </component> <component name="TestHistory"> @@ -1067,7 +1052,7 @@ <layout> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> - <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32953984" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32908365" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> @@ -1105,7 +1090,9 @@ <component name="VcsManagerConfiguration"> <MESSAGE value="trying to fix fitScreen" /> <MESSAGE value="Multicast joins both ipv4 and ipv6 now." /> - <option name="LAST_COMMIT_MESSAGE" value="Multicast joins both ipv4 and ipv6 now." /> + <MESSAGE value="find our screen on fitScreen remove requestSingleScreenSize " /> + <MESSAGE value="remove unsed code in FindRoot " /> + <option name="LAST_COMMIT_MESSAGE" value="remove unsed code in FindRoot " /> </component> <component name="XDebuggerManager"> <breakpoint-manager> @@ -1184,8 +1171,8 @@ <state vertical-scroll-proportion="0.0"> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <folding> - <element signature="e#3076#3077#0" expanded="true" /> - <element signature="e#3098#3099#0" expanded="true" /> + <element signature="e#2852#2853#0" expanded="true" /> + <element signature="e#2874#2875#0" expanded="true" /> </folding> </state> </provider> @@ -1202,25 +1189,7 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0"> <caret line="43" column="59" selection-start-line="43" selection-start-column="59" selection-end-line="43" selection-end-column="59" /> - <folding> - <element signature="imports" expanded="false" /> - <element signature="e#1886#1887#0" expanded="false" /> - <element signature="e#1913#1914#0" expanded="false" /> - <element signature="e#1941#1942#0" expanded="false" /> - <element signature="e#1974#1975#0" expanded="false" /> - <element signature="e#2009#2010#0" expanded="false" /> - <element signature="e#2040#2041#0" expanded="false" /> - <element signature="e#2073#2074#0" expanded="false" /> - <element signature="e#2095#2096#0" expanded="false" /> - <element signature="e#2127#2128#0" expanded="false" /> - <element signature="e#2149#2150#0" expanded="false" /> - <element signature="e#2185#2186#0" expanded="false" /> - <element signature="e#2213#2214#0" expanded="false" /> - <element signature="e#2248#2249#0" expanded="false" /> - <element signature="e#2273#2274#0" expanded="false" /> - <element signature="e#2312#2313#0" expanded="false" /> - <element signature="e#2327#2328#0" expanded="false" /> - </folding> + <folding /> </state> </provider> </entry> @@ -1248,6 +1217,7 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0"> <caret line="31" column="26" selection-start-line="31" selection-start-column="26" selection-end-line="31" selection-end-column="26" /> + <folding /> </state> </provider> </entry> @@ -1310,6 +1280,7 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0"> <caret line="31" column="26" selection-start-line="31" selection-start-column="26" selection-end-line="31" selection-end-column="26" /> + <folding /> </state> </provider> </entry> @@ -1352,32 +1323,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0"> - <caret line="43" column="59" selection-start-line="43" selection-start-column="59" selection-end-line="43" selection-end-column="59" /> - <folding> - <element signature="imports" expanded="false" /> - <element signature="e#1886#1887#0" expanded="false" /> - <element signature="e#1913#1914#0" expanded="false" /> - <element signature="e#1941#1942#0" expanded="false" /> - <element signature="e#1974#1975#0" expanded="false" /> - <element signature="e#2009#2010#0" expanded="false" /> - <element signature="e#2040#2041#0" expanded="false" /> - <element signature="e#2073#2074#0" expanded="false" /> - <element signature="e#2095#2096#0" expanded="false" /> - <element signature="e#2127#2128#0" expanded="false" /> - <element signature="e#2149#2150#0" expanded="false" /> - <element signature="e#2185#2186#0" expanded="false" /> - <element signature="e#2213#2214#0" expanded="false" /> - <element signature="e#2248#2249#0" expanded="false" /> - <element signature="e#2273#2274#0" expanded="false" /> - <element signature="e#2312#2313#0" expanded="false" /> - <element signature="e#2327#2328#0" expanded="false" /> - </folding> - </state> - </provider> - </entry> <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/src.zip!/java/net/MulticastSocket.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.33278823"> @@ -1394,25 +1339,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-19.266666"> - <caret line="63" column="45" selection-start-line="63" selection-start-column="45" selection-end-line="63" selection-end-column="45" /> - <folding> - <element signature="e#3076#3077#0" expanded="true" /> - <element signature="e#3098#3099#0" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0"> - <caret line="39" column="19" selection-start-line="39" selection-start-column="19" selection-end-line="39" selection-end-column="19" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommandChannelListener.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.04905969"> @@ -1429,18 +1355,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="-23.733334"> - <caret line="261" column="69" selection-start-line="261" selection-start-column="69" selection-end-line="261" selection-end-column="69" /> - <folding> - <element signature="imports" expanded="true" /> - <element signature="e#12298#12624#0" expanded="true" /> - <element signature="e#12623#12624#0" expanded="true" /> - </folding> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.018541409"> @@ -1449,14 +1363,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncProtocol.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0"> - <caret line="83" column="37" selection-start-line="83" selection-start-column="37" selection-end-line="83" selection-end-column="37" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/client/ClientToServerMessage.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.14833127"> @@ -1467,7 +1373,7 @@ </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.4284546"> + <state vertical-scroll-proportion="0.0"> <caret line="908" column="45" selection-start-line="908" selection-start-column="45" selection-end-line="908" selection-end-column="45" /> <folding> <element signature="e#0#45693#0" expanded="true" /> @@ -1475,6 +1381,53 @@ </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncProtocol.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.0"> + <caret line="83" column="37" selection-start-line="83" selection-start-column="37" selection-end-line="83" selection-end-column="37" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.0"> + <caret line="24" column="32" selection-start-line="24" selection-start-column="32" selection-end-line="24" selection-end-column="32" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="367.73334"> + <caret line="94" column="26" selection-start-line="94" selection-start-column="26" selection-end-line="94" selection-end-column="26" /> + <folding> + <element signature="imports" expanded="true" /> + <element signature="e#12298#12624#0" expanded="true" /> + <element signature="e#12623#12624#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.0"> + <caret line="27" column="47" selection-start-line="27" selection-start-column="47" selection-end-line="27" selection-end-column="47" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.3846154"> + <caret line="61" column="0" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" /> + <folding> + <element signature="e#2852#2853#0" expanded="true" /> + <element signature="e#2874#2875#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> </component> <component name="hg4idea.settings"> <option name="CHECK_INCOMING_OUTGOING" value="true" />
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java Sun Jun 12 09:06:53 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/FindRoot.java Sun Jun 12 09:23:38 2016 +0900 @@ -5,12 +5,14 @@ import java.io.BufferedReader; import java.io.IOException; -import java.io.InputStreamReader; -import java.net.*; +import java.net.DatagramPacket; +import java.net.InetAddress; +import java.net.MulticastSocket; +import java.net.ServerSocket; import java.nio.ByteBuffer; import java.nio.ByteOrder; -public class FindRoot implements Runnable { +public class FindRoot { final int BUFSIZE = 1024; private MulticastSocket soc; private InetAddress mAddr; @@ -18,26 +20,21 @@ private BufferedReader is; private int port; private boolean stopFlag = false; - private TreeVncRootSelectionPanel rootSelectionPanel = new TreeVncRootSelectionPanel(this); private String proxyAddr; /** * To find vnc root, a client sends a multicast packet. - * @param _port - * @param createConnectionParam + * @param _port TreeVNC waiting port + * @param createConnectionParam no use now */ public FindRoot(int _port, CreateConnectionParam createConnectionParam) { port = _port; - CreateConnectionParam cp = createConnectionParam; - rootSelectionPanel.setCp(cp); try { soc = TreeRootFinderListener.createMulticastSocket(); - soc.setTimeToLive(1); mAddr = InetAddress.getByName(TreeRootFinderListener.McastAddr); System.out.println("FindRoot socket on " + TreeRootFinderListener.McastAddr + " " + mAddr + " port " + _port); } catch (IOException e) { System.out.println("cannot create FindRoot socket. " + e); - return; } } @@ -64,88 +61,9 @@ System.out.println("cannot send FindRoot packet."); e.printStackTrace(); } - + soc.close(); } - - public String textPort() { - return rootSelectionPanel.getPort(); - } - - void socketClose() { - try { - rootSelectionPanel.unVisible(); - is.close(); - } catch (IOException e) { - e.printStackTrace(); - System.out.println("cannot is close."); - } - } - - /** - * TREEVNC_ROOT_FINDER is sent, wait for reply - */ - @Override - public void run() { - try { - rootSelectionPanel.visible(); - while(!stopFlag) { - Socket socket = server.accept(); - is = new BufferedReader(new InputStreamReader(socket.getInputStream())); - proxyAddr = is.readLine(); - // proxyAddr format - // 5999:localhost:localhost:133.13.59.210: - // port:hostname:hostname:ip address: - // GetBroadCastProxy create this string on VNC root - InetAddress adr = socket.getInetAddress(); - String proxyAddr1 = adr.getHostName(); - String proxyAddr2 = null; - if (proxyAddr1 != null) { - int portIndex = proxyAddr.indexOf(":"); - int restIndex = proxyAddr.indexOf(":", portIndex+1); - if (portIndex>0) { - proxyAddr2 = proxyAddr.substring(0, portIndex)+":"+proxyAddr1 + ":" + proxyAddr.substring(restIndex+1); - } - } - if(proxyAddr2!=null) - rootSelectionPanel.checkBox(proxyAddr2); - rootSelectionPanel.setButton(); - } - } catch (IOException e) { - System.out.println("an I/O error occurs " + e.getMessage()); - } - } + - public void setStopFlag(boolean stopFlag) { - this.stopFlag = stopFlag; - - } - - /** - * the thread is waiting accept system call, - * close the socket causes exception, - * which will terminated the thread. - * - * unused. - */ - public void interrupt() { - stopFlag = true; - try { - server.close(); - soc.close(); - } catch (IOException e) { - } - Thread.currentThread().interrupt(); - } - public boolean isStopFlag() { - return stopFlag; - } - - public void ipRegister() { - rootSelectionPanel.ipRegister(); - } - - public String getProxyAddr() { - return proxyAddr; - } }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java Sun Jun 12 09:06:53 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRootFinderListener.java Sun Jun 12 09:23:38 2016 +0900 @@ -59,8 +59,7 @@ if ((reply[0]&0xff) != TreeCommand.FIND_ROOT.cmd) { continue; } - int port = 0; - port = reply[8]; + int port = reply[8]; port = port * 256 + reply[9]; port = port * 256 + reply[10]; port = port * 256 + reply[11]; @@ -77,21 +76,11 @@ } } - public int parse_code( byte[] bs,int offset,int len ) - { - int intval = 0; - for( int i = offset; i < len ; i++ ) { - if (bs[i]==0 ) return intval; - intval = intval * 10 + ( bs[ i ] - '0' ); - } - return intval; - } - - public void run() { replyToRootSearchMulticast(); } + // it looks like that we never stop public void setStopFlag(boolean stopFlag) { this.stopFlag = stopFlag; }