Aggiunto esercizio su stab-skeleton. Creato esercizio quindi con dns resolver, client -> stub -> skeleton -> server

This commit is contained in:
2014-10-26 17:46:57 +01:00
parent 8db1dfaf28
commit 86f7477fca
13 changed files with 718 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ public class client {
Record r = new Record("Mario", "Rossi");
log.info("inviando Mario Rossi al server");
out.writeObject(r);
sock.close();

View File

@@ -29,7 +29,7 @@ public class server {
log.info("Accettata richiesta");
Thread request_management_thread = new Thread(new server_request_management(accept,database));
log.info("Richiesta inoltrata a thread");
request_management_thread.run();
request_management_thread.start();
log.info("Waiting on port 60k");
}

View File

@@ -36,14 +36,22 @@ public class server_request_management implements Runnable{
}
//operations on socket
sock.close();
log.info("Terminata gestione");
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
//operations on socket
log.info("Terminata gestione");
finally {
try {
sock.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}