diff src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java @ 92:ca39d762805e

NoConnection implies no needReconnection Viewer, reconnectionWaiter clean up(waitReply), sendReconnection clean up(createSocketAndSend).
author oc
date Mon, 19 May 2014 18:48:35 +0900
parents a719aa609e14
children 7b8d3411270a
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java	Mon May 19 10:52:07 2014 +0900
+++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java	Mon May 19 18:48:35 2014 +0900
@@ -33,7 +33,7 @@
 	private String reconnectionReason;
 	private AcceptThread acceptThread;
 	private GetBroadCastProxy getCast;
-	public AcceptClient aClient;
+	private AcceptClient clients;
 	public int opendPort;
 	static VncProxyService currentVps;
 	private int fbWidth = 0;
@@ -55,7 +55,7 @@
 		reconnectionReason = vps.reconnectionReason;
 		acceptThread = vps.acceptThread;
 		getCast = vps.getCast;
-		aClient = vps.aClient;
+		clients = vps.clients;
 		opendPort = vps.opendPort;
 	}
 
@@ -78,7 +78,7 @@
 
 	private void initProxy1(String hostName) {
 		myRfb = new MyRfbProtoProxy();
-		aClient = new AcceptClient();
+		clients = new AcceptClient();
 		isApplet = false;
 		setIsTreeVNC(true);
 		setConnectionParam(hostName,vncport);
@@ -142,7 +142,7 @@
 	}
 
 	private void threadSetAndStart() throws UnknownHostException, IOException {
-		CreateThread createThread = new CreateThread(aClient);
+		CreateThread createThread = new CreateThread(clients);
 		Thread thread = new Thread(createThread);
 		thread.start();
 		Thread thread2 = new Thread(new ChangeHost(this, forceReconnection));
@@ -201,7 +201,7 @@
 
 	}
 
-	private void createSocketAndSend(LinkedList<String> clientList,
+	private void sendReconnection(LinkedList<String> clientList,
 			String host, String port) throws UnknownHostException, IOException {
 		boolean passFlag = false;
 		int counter = 0;
@@ -211,7 +211,7 @@
 				DataOutputStream os = new DataOutputStream(
 						echoSocket.getOutputStream());
 				os.writeBytes("reconnection\n");
-				if(counter++ < aClient.getTreeBranch())
+				if(counter++ < clients.getTreeBranch())
 					os.writeBytes(port + "\n");
 				else 
 					os.writeBytes(5999 + "\n");
@@ -259,7 +259,7 @@
 		int count  = 0;
 		while(true) {
 			if(vps.myRfb.getReadyReconnect()) {
-				vps.createSocketAndSend(aClient.getList(), hostName, String.valueOf(vps.opendPort));
+				vps.sendReconnection(clients.getList(), hostName, String.valueOf(vps.opendPort));
 				break;
 			} else {
 				try {