Hi, I want to code a client/server app such that there will be one server and multiple clients interacting with the server. The clients will send messages, like "Hello, server," and the server will send messages back.
I know how to write a simple client/server app, however im confused as to how to write a simple app that involves multiple clients and the server being able to send replies to the right client.
So Client 1 and Client 2 both send hello messages to the server, i want the server to be able to say back, "Hello, Client1" to client 1 and "Hello, Client 2" to client 2. I want to run these clients and server on the same computer though, as a test before moving on to different computers.
Does anyone know how i can do this? Perhaps a small code example that can help?