changeset 139:407343700ccc

modify AcceptClient.java
author one
date Wed, 31 Aug 2011 16:57:38 +0900
parents e97c0f82eaf0
children 484fc6e38af7
files src/myVncProxy/AcceptClient.java src/myVncProxy/MyRfbProto.java
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/myVncProxy/AcceptClient.java	Tue Aug 30 19:01:36 2011 +0900
+++ b/src/myVncProxy/AcceptClient.java	Wed Aug 31 16:57:38 2011 +0900
@@ -5,7 +5,7 @@
 import java.net.*;
 import java.util.*;
 
-public class AcceptClient extends Thread {
+public class AcceptClient {
 	int counter = 0, parentnum = 0/* 落ちたときの親の番号をカウントするためのもの */;
 	LinkedList<String> ls = new LinkedList<String>();
 	boolean runflag = false;
@@ -109,7 +109,10 @@
 							if (checkRepetition.equals(ls.getLast())) {
 								checkRepetition = "stop";
 							} else {
-								checkRepetition = "go";
+//								checkRepetition = "go";
+								if((Integer.parseInt(checkRepetition) -1)/treebranch
+										== Integer.parseInt(port))
+									checkRepetition = "skip";
 							}
 							os.println(checkRepetition);
 
--- a/src/myVncProxy/MyRfbProto.java	Tue Aug 30 19:01:36 2011 +0900
+++ b/src/myVncProxy/MyRfbProto.java	Wed Aug 31 16:57:38 2011 +0900
@@ -206,8 +206,8 @@
 	}
 
 	void sendRfbVersion(OutputStream os) throws IOException {
-//		os.write(versionMsg_3_998.getBytes());
-		os.write(versionMsg_3_8.getBytes());
+		os.write(versionMsg_3_998.getBytes());
+//		os.write(versionMsg_3_8.getBytes());
 	}
 
 	void readVersionMsg(InputStream is, OutputStream os) throws IOException {