4 of 4
deleted 2167 characters in body
user avatar
user avatar

communication b/w multiple clients with multithreading on client side and server side using sockets c++

I have made a client and server program using sockets. On server side I have done multithreading so that each client is assigned a different thread. On client side, I want each client to be assigned a thread. For example, if there are 1000 clients that wants to communicate with the server then 1000 threads should be created, but here in my code I am getting an error "Error C2561 'receive': function must return a value". I don't know what I'm doing wrong. Can anyone just help me out? And is this code correct? I mean am I doing the multithreading in a right way?

user14448603