在线程" main"中获取异常java.io.EOFException的
在最后一行代码中,为什么?以及如何解决...谢谢。
String ip = "XXX.XX.XX.XXX";
int port = XXXXX;
Socket socket = null;
System.out.println("in function");
socket = new Socket(ip, port);
System.out.println("in function - After Socket");
ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
System.out.println("in function - After ObjectOutputStream");
ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());