thanks for these quick responds .
I will try this time to clarify everything regarding the multithreaded server.
we were asked to implement a TCP server single or multithreaded "but the multithreaded will gain more credits",this TCP server has to connect to a client which is given as .exe file by the professor"i have no access for the code", the server should respond to the client requests which are echo ,reverse echo ,time stamp , synchronise and error.
just to mention that we are using three libraries "winsock.dll , WS2_32 AND WSOCK32"
if (connSock = listener->Accept(client_addr)){
ThreadData *data = new ThreadData ( this,
connSock,
client_addr );
DWORD pth1 = _beginthreadex( NULL,
0,
ThreadedTCPServer::thread,
data,
0,
&thID );
}
else
break;
this is the part were I start the new thread and it will be handled by new connector socket not the same listner socket ...
so now if i try to check if its working properly i just added cou<<connsock;
but it was the same for each client that connects to the server .
all I am asking now is "how can I check if my code running as multithreaded or not ?? and if its multithreaded then do I have to use Roundrobin , Semaphore or Mutex ??and for what shall I use them because as far as i can tell i dont need to schedule the CPU because the each client connect to the server and send request to the server and recieve response and disconnect right away. if you need more details please dont hesitate to ask any questions.