Page 846 - 3-2
P. 846
client.start(); // 시작
}
} catch (Exception e) { // 에러출력
System.out.println(e.toString());
}
*/
}
public void run() {
Speaker sp = new Speaker();
sp.start();
ServerCheck serc = new ServerCheck();
serc.start();
try {
Thread.sleep(100);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
while(true)
{
try {
//System.out.println("run");
InetAddress local = InetAddress.getLocalHost();
String ip = local.getHostAddress();
//System.out.println(""+ ip);
if(acc==0)
try
{
System.out.println(" 서버대기 " + acc);
//System.out.println("getKeepAlive "+!c_sock.getKeepAlive());
c_sock = new Socket("192.168.137.1", 7777); //
System.out.println(" 서버에 접속됨");
din = new DataInputStream(c_sock.getInputStream());
dout = new DataOutputStream(c_sock.getOutputStream());
ServerCheck.check2=1;
- 846 -