i know how to create a single client and server program for chat i need to improvise this for multiple clients so that we should be able to communicate between two individual clients
This question is incredibly vague as currently phrased.
My guess is you're new to client-server communications. Start with Beej's Guide to Network Programming.
thats a tall order. whatever solution you have for 1 client/server probably wont work. With no other requirements, I would do the following:
- In the server, create a db with 2 tables, one for conversation and one for messages.
- The clients query the server for the conversation list, and then choose which conversation to listen on.
- Clients get updates by polling the server every X units of time.
This is a hard question that could be implemented many ways. How many clients were you thinking?
精彩评论