Team Cleancode
031302505 Huang
031302223 Ong Handsome
031302511 Limberchen
031302632 Zhang Yukun
031302536 Suliling
I. Completion of the situation:
At night, we discussed how to implement the chat function. Because of the success of the current market examples of how to achieve, we do not understand. The exact way to do this is as follows: Each time the client socket connects to the ServerSocket, the program stores the corresponding socket into the clients collection and initiates a thread for the socket that handles all the communication tasks for that socket. When the server thread reads the client data, the server stores the clients socket through the map, uses the client user ID as the key of the map, and when a sends a message to B, it searches for the socket of B and establishes their communication channel. On the offline information, this is mainly the function that the server assumes, I use the database to save the data. Client A sends a message to client B in the offline state, and the server will determine if client B is online, and if it is offline, it is stored in MySQL, and when client B is online, the server looks for its offline information, and if it has unread information, will be sent in a timely manner. Client B will be able to receive offline information. Do not know the method is not possible. I hope the teacher gives some advice. Our team is going to try.
Beta version Sprint sixth day