|
@ -21,9 +21,16 @@ class TCPServer { |
|
|
BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream())); |
|
|
BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream())); |
|
|
DataOutputStream outToClient = new DataOutputStream(connectionSocket.getOutputStream()); |
|
|
DataOutputStream outToClient = new DataOutputStream(connectionSocket.getOutputStream()); |
|
|
|
|
|
|
|
|
|
|
|
// Try/Catch hinzugefügt, nachdem bei Einsatz Amazon AWS (Healthcheck des ELB) clientSentence null war |
|
|
|
|
|
try { |
|
|
clientSentence = inFromClient.readLine(); |
|
|
clientSentence = inFromClient.readLine(); |
|
|
capitalizedSentence = clientSentence.toUpperCase() + '\n'; |
|
|
capitalizedSentence = clientSentence.toUpperCase() + '\n'; |
|
|
outToClient.writeBytes(capitalizedSentence); |
|
|
outToClient.writeBytes(capitalizedSentence); |
|
|
|
|
|
} catch (IOException ioe) { |
|
|
|
|
|
ioe.printStackTrace(); |
|
|
|
|
|
} catch (NullPointerException npe) { |
|
|
|
|
|
npe.printStackTrace(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |