Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetServer.cpp
Show First 20 Lines • Show All 410 Lines • ▼ Show 20 Lines | void CNetServerWorker::RunThread(CNetServerWorker* data) | ||||
debug_SetThreadName("NetServer"); | debug_SetThreadName("NetServer"); | ||||
data->Run(); | data->Run(); | ||||
} | } | ||||
void CNetServerWorker::Run() | void CNetServerWorker::Run() | ||||
{ | { | ||||
// The script context uses the profiler and therefore the thread must be registered before the context is created | // The script context uses the profiler and therefore the thread must be registered before the context is created | ||||
g_Profiler2.RegisterCurrentThread("Net server"); | g_Profiler2->RegisterCurrentThread("Net server"); | ||||
// We create a new ScriptContext for this network thread, with a single ScriptInterface. | // We create a new ScriptContext for this network thread, with a single ScriptInterface. | ||||
std::shared_ptr<ScriptContext> netServerContext = ScriptContext::CreateContext(); | std::shared_ptr<ScriptContext> netServerContext = ScriptContext::CreateContext(); | ||||
m_ScriptInterface = new ScriptInterface("Engine", "Net server", netServerContext); | m_ScriptInterface = new ScriptInterface("Engine", "Net server", netServerContext); | ||||
m_InitAttributes.init(m_ScriptInterface->GetGeneralJSContext(), JS::UndefinedValue()); | m_InitAttributes.init(m_ScriptInterface->GetGeneralJSContext(), JS::UndefinedValue()); | ||||
while (true) | while (true) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator