v.addElement(rt);
rt.start();
System.out.println("dddddddddddddddddddddddd");
}catch(Exceptionex){}
}
}
/*publicvoidcommandAction(Commandc,Displayabled){
if(c==cmdSend){
try{System.out.println("eeeee");
dos.writeUTF(tfMsg.getString());
}catch(Exceptionex){}
}
}*/
classReceiveThreadextendsThread{
privateSocketConnectionsc;
privateDataInputStreamdis;
privateDataOutputStreamdos;
privateStringniName;
publicReceiveThread(SocketConnectionsc){
this.sc=sc;
this.niName=niName;
try{
System.out.println("d");
dis=sc.openDataInputStream();
dos=sc.openDataOutputStream();
niName=dis.readUTF();
frm.append(niName);
System.out.println("ddd");
}catch(Exceptionex){}
}
publicvoidrun(){
while(true){System.out.println("g");
try{
Stringstr=dis.readUTF();
//frm.append(str);
for(inti=0;i
ReceiveThreadrt=(ReceiveThread)v.elementAt(i);
rt.dos.writeUTF(niName+"说:"+str);
System.out.println("gg");
}
}catch(Exceptionex){}
close();
}
}
}
publicvoidclose(){
System.out.println("gggg");
try{
//DataInputStreamdos=null;
//dos.close();
//DataInputStreamdis=null;
//dis.close();
sc.close();
ssc.close();
System.out.println("gggggggg");
}catch(Exceptionex){