Mercurial > hg > Members > nobuyasu > tightVNCClient
view src/myVncClient/WaitReply.java @ 55:f2f4b0398f04
update EchoClient.java
author | Yu Taninari <you@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 28 Jul 2011 18:06:46 +0900 |
parents | c07bec8c8617 |
children | 18a19d8a09f4 |
line wrap: on
line source
package myVncClient; import java.net.*; import java.io.*; public class WaitReply extends Thread { MyVncClient client; private String treenum; public WaitReply(String treenum,MyVncClient 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.clientSocket = clientSocket; client.init(null); client.start_threads(); client.start(); //MyVncClient.main(clientSocket); //echo.Interruption(clientSocket); } }catch (IOException e){ System.out.println(e); } /* try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } */ } } }