Le 14/04/15 10:43, Abeer Al-Anazi a écrit :
> I want to send this value to a specific cilent. Which is mean from
> the server to client c1 only, Not for all client. How can I do that? Should
> I create serverHandler for each client?or what?
>
Your code will send the message to every client that opens a connection.
Every single one. This is just plain logical, because the sessionOpened
event is fired every time a new client connects.

If you want to send a message to a specific client then you have to
identify the client and only do a session.write() for the client you are
targetting.


Side note : doing a session.write() does *not* send the message to many
clients. It only send the message to one single client.

Reply via email to