回复:(huangnetian)一个socket 问题
import ......
class newSocket implements Runable
{
private Socket socket;
private BufferedReader in;
private PrintWriter out;
public newSocket(ServerSocket server)
{
this.server=server;
new Thread(this).start();
}
public void run()
{
try
{
while(true)
{
socket=server.accept();
in=new BufferedReader(new InputStreamReader(socket.getInputStream()));
out=new PrintWriter(socket.getOutputStream(),true);
........
}
}
catch(Exception e)
{}
}
}
}
[此贴子已经被作者于2007-4-10 13:07:00编辑过]