diff --git a/src/main/java/top/c0r3/talk/client/Command.java b/src/main/java/top/c0r3/talk/client/Command.java index e12b6a4..e847786 100644 --- a/src/main/java/top/c0r3/talk/client/Command.java +++ b/src/main/java/top/c0r3/talk/client/Command.java @@ -19,7 +19,6 @@ public static void Process(String command) { System.out.println("/help: Show this message"); System.out.println("/clear: Clear the screen"); System.out.println("/connect: Connect to another person"); - System.out.println("/accept: Accept the connection"); System.out.println("/record: Record the chat history"); } case "/clear" -> { diff --git a/src/main/java/top/c0r3/talk/server/server.java b/src/main/java/top/c0r3/talk/server/server.java index fa8912f..aaf48c0 100644 --- a/src/main/java/top/c0r3/talk/server/server.java +++ b/src/main/java/top/c0r3/talk/server/server.java @@ -23,6 +23,7 @@ public static ServerInfo getConnectServerInfo() { public void Init(){ try{ + @SuppressWarnings("resource") ServerSocket ss = new ServerSocket(SelfServerInfo.ServerPort); System.out.println("Server is running on "+InetAddress.getLocalHost()+":"+SelfServerInfo.ServerPort); SelfServerInfo.ServerIP = InetAddress.getLocalHost().toString().substring( @@ -35,7 +36,8 @@ public void Init(){ ConnectServerInfo = (ServerInfo) ois.readObject(); if(!Objects.equals(ConnectServerInfo.ServerIP, "0")){ System.out.println("Connecting with "+ConnectServerInfo.ServerName+ - " ,input /reject to reject the connection"); + " ,input /reject to reject the connection," + + " input /accept to accept the connection"); } BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream())); // 创建一个线程读取客户端消息并打印到控制台