comparison src/myVncClient/WaitReply.java @ 50:c07bec8c8617

change echoClient.java EchoClient.java
author Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
date Thu, 21 Jul 2011 23:53:48 +0900
parents 0729e856169d
children f2f4b0398f04
comparison
equal deleted inserted replaced
49:a9e0284cc29c 50:c07bec8c8617
3 import java.net.*; 3 import java.net.*;
4 import java.io.*; 4 import java.io.*;
5 5
6 6
7 public class WaitReply extends Thread { 7 public class WaitReply extends Thread {
8 echoClient echo;
9 Socket clientSocket = null;
10 ServerSocket echoServer=null;
11 boolean mainFlag;
12 8
13 WaitReply(echoClient _echo){ 9 private String treenum;
14 echo = _echo; 10
11 public WaitReply(String treenum) {
12 this.treenum = treenum;
15 } 13 }
16 14
17 public void run(){ 15 public void run(){
16 Socket clientSocket = null;
17 ServerSocket echoServer=null;
18 //boolean mainFlag;
18 19
19 while(true){ 20 while(true){
20 try { 21 try {
21 echoServer = new ServerSocket(10001 + Integer.parseInt(echoClient.value.treenum)); 22 echoServer = new ServerSocket(10001 + Integer.parseInt(treenum));
22 } 23 }
23 catch (IOException e) { 24 catch (IOException e) {
24 System.out.println(e); 25 System.out.println(e);
25 } 26 }
26 try { 27 try {