📄 readme.txt
字号:
Here are the instructions on compiling and running each program:
ChatServer.java
First, compile this java file through cmd:
javac ChatServer.java
to ChatServer.class.
Second, run this class file also through cmd:
java ChatServer <port>
Now the chat server is running. This chat server will accept all the GUIClient's connections and broadcast their statements and messages. At the same time, the broadcast contents will be displayed on the chat server's console window just as same as the GUIClient's message format. The chat server manager can look out them very quickly and conveniently.
Note:
1. If no port number input, the chat server wouldn't run.
2. If the GUIClient send an unacceptable request to the chat server, the program will input an error message on the chat server's console window.
3. If the GUIClient send a message which has character "^" in the middle, the chat server will change them into blanks automatically.
4. If the same nickname appears, the chat server will make the nicknames different automatically.
GUIClient.jar
When a chat server has run, you can open another cmd window and run the given client program like this:
Java –jar GUIClient.jar <hostname> <port> <nickname>
Then the connection between client and chat server will be built. And you can chat with each other clients through a GUI window.
When someone joins in, the chat box will display:
Server: <nickname> has joined from <client name> (<current time>)
When someone part out, the chat box will display:
Server: <nickname> has parted out who is at <client name> (<current time>)
When someone sends message, the chat box will display:
<nickname> : <message>
Note:
1. If you don't input the hostname, port number or your nickname with correct formation to the GUIClient, the program will input an error message on the screen.
2. When chatting, you can input "^" in the sentences. But the other GUIClients will not be able to receive it.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -