Multithreading advice, please...
Posted on 1998-10-13
I'm finished a client-server application, which knows chat,
database access, whiteboard and so on, but the server is not multithreading. I have the next situation:
- there is a class, which is derived from CSocket class, and manage the connection with the clients - the client class
- I have one class, the Doc class, who receive on a specified port the clients, which are trying to access the server - the server class
Each client object have access to some data from the "server" class and vice-versa (each client have a pointer to the server class)
I have some ideas to modify this program to obtain a multithreaded application:
- to make a multiple inheritance when I derive the client class by using the CSocket and CWinThread classes
- to use worker threads for each client, and transfer to the treads a pointer to the server class
Please tell me, how can do easier the multithreading in this situation??