Transmitting from server to all clients.
I've currently got a basic echoing server which can handle multiple clients via threading.
I've got it so that i can see all client messages via the server, but now I want to transmit the messages the server receives from all clients, to all clients (where clients see what other clients have said via the server).
My question is... is there a 'broadcast all' or similar methods available that I might not have come across?
Or if there isn't what approach would drive me in the right direction? such as storing all client sockets in an arraylist, or somehow directly access the ServerSocket object in a totally different class.
Sorry for long and perhaps vague question, but all and any help will be greatly appreciated.