new Thread(){
private PrintWriter writer;
public void sendObj(Object obj){
try{
if(writer != null){
writer.println(obj);
}
}catch(Exception err){}
}
public void run(){
synchronized(this.getClass()){
try{
writer.println(obj);
}
}catch(Exception err){}
}
public void run(){
synchronized(this.getClass()){
try{
Socket socket = new Socket("netAdress",port);
writer = new PrintWriter(socket.getOutputStream());
sendObj(id+","+pass);
}catch(Exception err){}
}
}
}
writer = new PrintWriter(socket.getOutputStream());
sendObj(id+","+pass);
}catch(Exception err){}
}
}
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น