I am Developing an Client Server socket application .Am reading Strings in server side for multiple clients inside run(override) method and I getting EOF Exception at readUTF. I Dont know why the error is comming and how to rectify it.
while (ss.compareTo("true") == 0) {
System.out.println("Waiting for port " + port);
sdc = soc.accept();
cs[i] = sdc;
System.out.println("Connected port " + cs[i]);
DataInputStream dind = new DataInputStream(cs[i].getInputStream());
DataOutputStream dout = new DataOutputStream(cs[i].getOutputStream());
String password = dind.readUTF();
String dept = dind.readUTF();
uniqueName = dind.readUTF();
String username = dind.readUTF();
String ipaddress = dind.readUTF();
String macaddress = dind.readUTF();
String groupname = dind.readUTF();
}