コード例 #1
0
ファイル: Server.cpp プロジェクト: yodamaster/ffead-cpp
void Server::start()
{
	lock.lock();
	if(!started && runn)
	{
		started = true;
		if(mode==1)
		{
			if(fork()==0)
			{
				servicing(this);
			}
		}
		else if(mode==2)
		{
			Thread servicing_thread(&servicing, this);
			servicing_thread.execute();
		}
		else if(mode==3)
		{
			servicing(this);
		}
	}
	lock.unlock();
}
コード例 #2
0
ファイル: NBServer.cpp プロジェクト: GYGit/ffead-cpp
void NBServer::start()
{
	lock.lock();
	if(!started && runn)
	{
		started = true;
		Thread servicing_thread(&servicing, this);
		servicing_thread.execute();
	}
	lock.unlock();
}