我试图在 java 中的套接字之间编写哈希表,但收到此错误:错误:写入中止;java.io.NotSerializableException: java.net.Socket
我怎么写
编辑:
socktmp= mainSocket.accept();
rdr= new BufferedReader( new InputStreamReader(socktmp.getInputStream()));
String t="";
String name=rdr.readLine();
//rdr.close();
LstClient.AddClient(name, socktmp);
objwriter = new ObjectOutputStream(socktmp.getOutputStream());
objwriter.writeObject(LstClient.clients);
objwriter.flush();
objwriter.close();