Added some TODOs in Client.java
This commit is contained in:
parent
3c89b60592
commit
04df8806cd
@ -17,6 +17,7 @@ public class Client {
|
||||
this.out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
|
||||
this.in = new BufferedReader((new InputStreamReader((socket.getInputStream()))));
|
||||
|
||||
//TODO add the system based generated username here.
|
||||
this.userName = userName;
|
||||
this.out.write(getUsername());
|
||||
this.out.newLine();
|
||||
@ -55,7 +56,14 @@ public class Client {
|
||||
return pp.parseMsg(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Listens for incoming messages
|
||||
*/
|
||||
public void chatListener() {
|
||||
/*TODO: what type of decoding has to be done
|
||||
think better about structure for incoming messages
|
||||
*/
|
||||
//TODO how shall input be logged?
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -76,6 +84,8 @@ public class Client {
|
||||
}
|
||||
|
||||
public void closeEverything(Socket socket, BufferedReader in, BufferedWriter out) {
|
||||
//TODO Correctly closing a clients connection
|
||||
//TODO the server should be notified in a way so he can handle it cleanly
|
||||
try {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
|
||||
Reference in New Issue
Block a user