(Official Java development engineer QQ group (27163376), please enter your ID for verification. A chat room applet is taken out to share the realization function of the client 1. Log in to the server, if the characters entered in the server port number and IP number are both 0, the client connects to the default server 2. Enter the chat nickname 3. Enter -quit will automatically exit the chat 4. Input -getList will get the title of the online user 5. Input -tolt; user name gt; lt; chat information gt; -help will get the corresponding operation help of the client 6. Direct input will send the content to all online users. The client's class and method 1. Establish connection method: connectServer(Stringip, intport) 2. Disconnect method: disconnectServer ()2. Send message method: sendMes(Stringmes)3. Accept message method: getMes()4. Accept one message: getMesOnce()5. Get user list: getList(Stringmes)6. Test connection method: testConnect(Stringip, intport) 7. Check the username: checkNickName(StringnickName) 8. Get the help list: helpList(); 9. The input of each content should be noted in the main method because the client cannot know when the server forwards the data, so The client needs to constantly monitor messages. In order not to affect other methods, such as sending data, multi-threading is used here, that is, a separate thread is created for receiving data to avoid affecting the normal work of other methods. This document includes the following attachments:
Chat1\.settings\org.eclipse.jdt.core.prefs
Chat1\bin\ChatClient.class
Chat1\bin\ChatPanel.class
Chat1\bin\ChatPanelSocket.class
Chat1\bin\ChatServer.class
Chat1\bin\MyPanel.class
Chat1\bin\pubilc.class
Chat1\src\ChatClient.java
Chat1\src\ChatPanel.java
Chat1\src\ChatPanelSocket.java
Chat1\src\ChatServer.java
Chat1\src\MyPanel.java
Chat1\src\pubilc.java
Chat1\.classpath
Chat1\.project)