- ChatServer.java: multiplex IO service, can response to any client socket any time with non-blocking IO.
- ChatService.java: A Class for managing chat rooms. Decoupling handler codes from IO-relative codes.
- git clone https://github.com/BigdataXiangGD/ChatServer
- cd ChatServer/ChatServer
- Use
./compile.shto compile source codes. - Use
./start.sh <port>to run chat server.
- Notice:
- The ChatServer can not shut down by the given Chat Server Test, you should use
telnet <Server IP> <Server Port>and then inputKILL_SERVICEto force the Server to shutdown, thus the test could be forced to end. - Execute
./start_client.sh <Server IP> <Server port>to run client. - The ChatClient hasn't
KILL_SERVICEcommand. Users can usetelnet <Server IP> <Server Port>and then inputKILL_SERVICEto see the result.
- Grade: 73 = round( (75 / 75) * 20 + (1275 / 1755) * 70 + (5 / 25) * 10)