Closed hwray closed 10 years ago
I've added broadcastAddSong, SetSong, MoveSong, and RemoveSong methods to the Jam object. These take care of all the "if (isMaster)" logic, as well as the looping through client objects and sending/callbacks for the Async HTTP requests.
We have a lot of repetitive places in our code where we awkwardly loop through the set of clients in the Jam to make an AsyncHttp request. We should replace these with broadcast() or sendMessage() methods in the Jam, which can be responsible for checking if master/client and taking the appropriate action.