Mercurial > hg > Applications > TightVNC_orginal
comparison src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java @ 48:6ebe870da138
this version resolve change host problem.
author | one |
---|---|
date | Tue, 18 Dec 2012 17:56:49 +0900 |
parents | f3b775d3592a |
children | b0c7fad4c695 |
comparison
equal
deleted
inserted
replaced
47:f3b775d3592a | 48:6ebe870da138 |
---|---|
119 // write later | 119 // write later |
120 } | 120 } |
121 } else { | 121 } else { |
122 // getHostData(); | 122 // getHostData(); |
123 } | 123 } |
124 run(); | 124 run1(); |
125 createConnectionAndStart(); | 125 createConnectionAndStart(); |
126 getChangeScreenRequest(); // Should be used Client Socket. | 126 getChangeScreenRequest(); // Should be used Client Socket. |
127 try { | 127 try { |
128 threadSetAndStart(); | 128 threadSetAndStart(); |
129 } catch (UnknownHostException e) { | 129 } catch (UnknownHostException e) { |
354 Socket echoSocket; | 354 Socket echoSocket; |
355 echoSocket = new Socket(client, 10001); | 355 echoSocket = new Socket(client, 10001); |
356 DataOutputStream os = new DataOutputStream( | 356 DataOutputStream os = new DataOutputStream( |
357 echoSocket.getOutputStream()); | 357 echoSocket.getOutputStream()); |
358 os.writeBytes("reconnection\n"); | 358 os.writeBytes("reconnection\n"); |
359 System.out.println("port ==== " + port); | |
359 os.writeBytes(port + "\n"); | 360 os.writeBytes(port + "\n"); |
360 os.close(); | 361 os.close(); |
361 } | 362 } |
362 passFlag = true; | 363 passFlag = true; |
363 } | 364 } |
369 VncProxyService newVps = new VncProxyService(this,hostName); | 370 VncProxyService newVps = new VncProxyService(this,hostName); |
370 // run call and change workingProtocol | 371 // run call and change workingProtocol |
371 newVps.connectionParams.hostName = hostName; | 372 newVps.connectionParams.hostName = hostName; |
372 if (newVps.run1()) { | 373 if (newVps.run1()) { |
373 newVps.createConnectionAndStart(); | 374 newVps.createConnectionAndStart(); |
374 newVps.createSocketAndSend(aClient.getList(), String.valueOf(opendPort)); | 375 newVps.createSocketAndSend(aClient.getList(), String.valueOf(newVps.opendPort)); |
375 } else { | 376 } else { |
376 newVps.cleanUpSession(); | 377 newVps.cleanUpSession(); |
377 } | 378 } |
378 } | 379 } |
379 | 380 |