// Copyright Epic Games, Inc. All Rights Reserved. #include "httpnull.h" #include #include namespace zen { HttpNullServer::HttpNullServer() { } HttpNullServer::~HttpNullServer() { } void HttpNullServer::RegisterService(HttpService& Service) { ZEN_UNUSED(Service); } void HttpNullServer::Initialize(int BasePort) { ZEN_UNUSED(BasePort); } void HttpNullServer::Run(bool IsInteractiveSession) { const bool TestMode = !IsInteractiveSession; if (TestMode == false) { zen::logging::ConsoleLog().info("Zen Server running (null HTTP). Press ESC or Q to quit"); } do { int WaitTimeout = -1; if (!TestMode) { WaitTimeout = 1000; } if (!TestMode && _kbhit() != 0) { char c = (char)_getch(); if (c == 27 || c == 'Q' || c == 'q') { RequestApplicationExit(0); } } m_ShutdownEvent.Wait(WaitTimeout); } while (!IsApplicationExitRequested()); } void HttpNullServer::RequestExit() { m_ShutdownEvent.Set(); } } // namespace zen