Connection reset by peer这个错误怎么改

新石器时代 2009-08-30 11:10:06
public class Server{



Socket s;

public Server(Socket s)
{
this.s=s;
}

public static void ServerStart() {
try {
ServerSocket ss=new ServerSocket(6000);
while(true)
{
Socket s = ss.accept();

new ServerThread(s).start();

}

}
catch (Exception ex) {
ex.printStackTrace();
}

}

public static void main(String[] args) {

new Database();

ServerStart();
}


}


在serverThread里
ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());
就抛出异常了


...全文
263 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧