Java EchoTCPServer - Send to all clients

后端 未结 2 551
失恋的感觉
失恋的感觉 2021-01-15 06:05

Here\'s my code:

SERVER:

package server;

public class Main {
    public static void main(String args[]) {
        new EchoServer(9000);
    }
}
         


        
2条回答
  •  遥遥无期
    2021-01-15 07:03

    You should take a look at multiThreaded chat Server. Each client wich connects gets it's own thread.

    Here is the perfect answer to your question:

    multithread client-server chat, using sockets

    Good luck mate!

提交回复
热议问题