Mercurial > hg > Members > nobuyasu > tightVNCClient
view src/myVncClient/WaitReply.java @ 90:7a1e934144e6
modify RFB Protocol version 3.855.
author | e085711 |
---|---|
date | Tue, 20 Sep 2011 13:42:01 +0900 |
parents | ba6e672cc47c |
children | 1d1bb77d871b 961a5915834f |
line wrap: on
line source
package myVncClient; import java.net.*; import java.io.*; public class WaitReply extends Thread { // MyVncClient client; InterfaceForViewer client; private String treenum; boolean passflag; /* * public WaitReply(String treenum,MyVncClient client) { this.client = * client; this.treenum = treenum; } */ public WaitReply(String treenum, InterfaceForViewer client) { this.client = client; this.treenum = treenum; } public void run() { Socket clientSocket = null; ServerSocket echoServer = null; // boolean mainFlag; while (true) { try { echoServer = new ServerSocket(10001 + Integer.parseInt(treenum)); } catch (IOException e) { System.out.println(e); } try { clientSocket = echoServer.accept(); if (clientSocket != null) { client.close(); // client.clientSocket = clientSocket; client.setClientSocket(clientSocket); client.init(); passflag = true; client.setEchoValue(null); client.getParentName(); client.start_threads(); client.start(); // MyVncClient.main(clientSocket); // echo.Interruption(clientSocket); echoServer.close(); } } catch (IOException e) { System.out.println(e); } /* * try { Thread.sleep(100); } catch (InterruptedException e) { * e.printStackTrace(); } */ } } }