本文整理汇总了C++中HTTPServer::GetIsRunning方法的典型用法代码示例。如果您正苦于以下问题:C++ HTTPServer::GetIsRunning方法的具体用法?C++ HTTPServer::GetIsRunning怎么用?C++ HTTPServer::GetIsRunning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTTPServer
的用法示例。
在下文中一共展示了HTTPServer::GetIsRunning方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitializeCriticalSection
//.........这里部分代码省略.........
{
// Fire up all of our test sites
int errors = 0;
// Individual tests
errors += Test_CrackURL();
errors += Test_HTTPTime();
errors += TestThreadPool(server->GetThreadPool());
// HTTP tests
errors += TestBaseSite(server);
errors += TestSecureSite(server);
errors += TestClientCertificate(server,true);
errors += TestCookies(server);
errors += TestFormData(server);
errors += TestJsonData(server);
errors += TestInsecure(server);
errors += TestPushEvents(server);
errors += TestBodySigning(server);
errors += TestBodyEncryption(server);
errors += TestMessageEncryption(server);
errors += TestReliable(server);
errors += TestReliableBA(server);
errors += TestToken(server);
errors += TestSubSites(server);
errors += TestFilter(server);
errors += TestPatch(server);
errors += TestCompression(server);
errors += TestAsynchrone(server);
errors += TestWebSocket(server);
// Test the WebServiceServer program generation
CString contract = "http://interface.marlin.org/testing/";
errors += TestJsonServer(server,contract,logLevel);
errors += TestWebServiceServer(server,contract,logLevel);
// See if we should wait for testing to occur
if(errors)
{
printf("\n"
"SERVER (OR PROGRAMMING) IN ERROR STATE!!\n"
"%d sites not correctly started\n"
"\n",errors);
}
else
{
printf("\n"
"Server running....\n"
"Waiting to be called by test clients...\n"
"\n");
// Wait for key to occur
WaitForKey();
}
// Try to stop the WebSocket
// errors += StopWebSocket();
//
// Try to stop the subsites
errors += StopSubsites(server);
// Testing the errorlog function
server->ErrorLog(__FUNCTION__,5,"Not a real error message, but a test to see if it works :-)");
printf("Stopping the server\n");
server->StopServer();
// See if the server is indeed in stopped state
printf("The server is %s\n",server->GetIsRunning() ? "still running!\n" : "stopped.\n");
// Remember for a cmd shell
nRetCode = errors;
}
else
{
totalErrors = 1;
printf("HTTPServer in error state in : Error %lu: %s\n"
,server->GetLastError()
,(LPCTSTR)GetLastErrorAsString(GetLastError()));
}
CleanupServer(server,logfile);
}
}
printf("\n");
printf("SUMMARY OF ALL SERVER TESTS\n");
printf("===========================\n");
if(totalErrors)
{
printf("ERRORS: %d\n",nRetCode += totalErrors);
}
else
{
printf("ALL OK !!!! YIPEEEE!!!!\n");
}
WaitForKey();
WaitForKey();
}
DeleteCriticalSection(&std_stream);
return nRetCode;
}