Majid Dehghan said:
thanks Jim
the serve.
could you be more specific,
how to do that?
That is up to you. Each client needs to have some short, text unique
name by which to identify himself. I think you have two basic
approaches:
1. You assign each client a unique name when they connect.
2. You allow each client to provide a name, then check to make sure
that name is unique.
The name must be known to all of the clients, so each client can decide
to whom he is sending a message.
Just how this is done depends upon the number of clients, how well they
know each other, and how they normally identify themselves to each
other. I have no idea what would be appropriate to your environment,
and that is really outside the scope of this newsgroup.
Once you have decided upon a scheme for uniquely identifying clients,
then how to implement that scheme is within the scope of this
newsgroup.
Once you have a unique name for each client, you can use that name
within your program as array elements or hash keys to maintain
information about each client.