I have a server-client application. The server is suppsoed to identify the client connecting and then start the acording thread for the client, after that it should continue to lissen for other clients. This is a part of the code:
ClientIncomming() is returning the client-socket to the global variable Sock.
do{
Client = ClientIncomming(4567);
Client.Receive(Pack);
Pack >> Type;
if(Type == "Boss" && !BossThread){
sf::Thread Boss(&Boss);
Boss.Launch();
}
else if(Type == "Shooter" && !ShooterThread){
sf::Thread Shooter(&Shooter);
Shooter.Launch();
}
else if(Type != "Boss" || Type != "Shooter")
std::cout << "Undefined Client tried to connect, rejected" << std::endl;
}while(1);
The thing is...the threads dont really act like threads, they act lika normal functions...
anyone have any idea? please ask me if you want some other part of the code.