What is the way that need to be implemented in java to make a server broadcasts a voice to multiple clients, instead of broadcast voice only to one client? for example I am doing a server which can broadcast voice to multiple clients at the same time, now my server can only broadcast to one clien.

Recommended Answers

All 2 Replies

One method would be to keep a list of all active clients and call a method that would iterate over that list and send your message to each. How is your server structured now? Is it multithreaded?

Thank you for your help .Yes, my server is a multithread, because it maintains text chatting also with multiple clients.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.