Sending a message to all clients (Client - Server communication)

前端 未结 3 2030
北海茫月
北海茫月 2020-11-29 04:29

So now, I am making a client server app based multithread. In server side, I make a thread for everysingle connection that accepted.

In thread class, I make a method

3条回答
  •  一个人的身影
    2020-11-29 04:39

    Check out zeroMQ. There are methods known as "pub sub" or "publish subscribe" that will do what you want. You can also use it to communicate between your threads. It is an amazing library in my opinion. It has java or jzmq bindings along with over 30+ others as well so you should be able to use it in your program.

    http://www.zeromq.org/

提交回复
热议问题