public class ClientHandler extends Thread {
private final Socket client;
public ClientHandler(Socket client) {
this.client = client;
start();
}
@Override
public void run() {
while (true) {
try {
ObjectInputStream dis = new ObjectInputStream(this.client.getInputStream());
Definition def = (Definition) dis.readObject();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
public Socket getClient() {
return client;
}