Hello Ken,
In grizzly we don't have any built-in mechanism for broadcasting...
I think the way you used before is appropriate for Grizzly also.
Thank you.
WBR,
Alexey.
On Aug 18, 2008, at 5:47 , Ken--_at_newsgroupstats.hk wrote:
>
> In the past with plain java.nio or old java.io. I used a HashMap to
> store a
> list of java.net.Socket/InputStream/OutputStream of logined client.
>
> Whenever I want to broadcast / send private message to client(s), I
> use:
>
> Vector vtClient = Clients.getAllClients(); // or
> Clients.getClientById(id);
> for() {
> (Client)vtClient.elementAt(i).getOutputStream().write(messages);
> }
>
> So, how to do it in grizzly? I know I can do it with my own method
> easily
> but I want to know that best practice.
>
> Thanks and Regards,
> Ken
>
>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Best-Practice-to-broadcast---send-private-messages-to-client%28s%29-tp19025702p19025702.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>