Mercurial > hg > Members > nobuyasu > tightVNCClient
view src/myVncClient/WaitReply.java @ 37:73b4a33ed3db
change class name WaitReply
author | Yu Taninari <you@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 08 Jul 2011 20:23:08 +0900 |
parents | 451dbe703e39 |
children | 0729e856169d |
line wrap: on
line source
package myVncClient; import java.net.*; import java.io.*; public class WaitReply extends Thread { echoClient echo; Socket clientSocket = null; ServerSocket echoServer=null; boolean mainFlag; waitreply(echoClient _echo){ echo = _echo; } public void run(){ while(true){ try { echoServer = new ServerSocket(10001 + Integer.parseInt(echoClient.value.treenum)); } catch (IOException e) { System.out.println(e); } try { clientSocket = echoServer.accept(); if(clientSocket != null){ MyVncClient.main(clientSocket); //echo.Interruption(clientSocket); } }catch (IOException e){ System.out.println(e); } /* try { Thread.sleep(100); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } */ } } }