void Server::Start()
{
while (true)
{
if ((NewConn = accept(ServerSocket, reinterpret_cast<SOCKADDR*>(&ServerAddr), &SizeOfAddr)) == -1)
{
std::cout << "New connection: FAIL\n";
continue;
}
std::cout << "Client connected\n";
std::thread NewThread(&Server::ClientThread, this, NewConn);
NewThread.detach();
}
}