Reputation: 35
I'm looking to write a chat program in Java that would have functionality along these lines.
My question is how would you implement #3? Would you need to make new sockets?
Upvotes: 0
Views: 104
Reputation: 651
Let the server handle all chats. Make your own "protocols" so your client sends a package containing both the message and destination (user). This can be done with either sending Strings with information you can parse or whole objects. This way it's also pretty easy to create groups with certain users in, all handled by the server.
Upvotes: 1