forked from cafeberry/cafeberry
feat: add smartcmd dedicated server
major bug: when connecting to the server a second time, it gets softlocked and keeps repeating ticking connection A\n in debug logs until it times out.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ServerCli.h"
|
||||
|
||||
#include "ServerCliEngine.h"
|
||||
#include "ServerCliInput.h"
|
||||
|
||||
namespace ServerRuntime
|
||||
{
|
||||
ServerCli::ServerCli()
|
||||
: m_engine(new ServerCliEngine())
|
||||
, m_input(new ServerCliInput())
|
||||
{
|
||||
}
|
||||
|
||||
ServerCli::~ServerCli()
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
void ServerCli::Start()
|
||||
{
|
||||
if (m_input && m_engine)
|
||||
{
|
||||
m_input->Start(m_engine.get());
|
||||
}
|
||||
}
|
||||
|
||||
void ServerCli::Stop()
|
||||
{
|
||||
if (m_input)
|
||||
{
|
||||
m_input->Stop();
|
||||
}
|
||||
}
|
||||
|
||||
void ServerCli::Poll()
|
||||
{
|
||||
if (m_engine)
|
||||
{
|
||||
m_engine->Poll();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user