Link to home
Start Free TrialLog in
Avatar of tech1guy
tech1guyFlag for United States of America

asked on

client-server

Hi experts,
I've a simple client and server in C on unix platform. The server displays the date in 'mm/dd/yy' OR 'dd/mm/yy' format depending upon the requested format by client.
It's running absolutly fine, but it's for single client. Now, I'm trying to implement it for multiple clients using select(), it's going fine, but is it possible for server to remember the choice for every client?
I mean can the server remember which client requests date in which format?

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tech1guy

ASKER

could you please explain that in some detail as I'm NOT a expert in client-server programming.
Well, your problem is that you some sort of connection set up (I was assuming a socket in the above) and need to associate data (settings in your case) with that connection. So you have to somehow 'bundle' that information, and that's where structs come in handy.
I'm not closing connection after each client is served. I'm using Select()method instead of Fork. Will your technique work with my scenario?
Yes, you only need to store the data for each connection seperately, regardless of how you maintain the communication itself.
thanks! it helps