15 using std::make_unique;
18 using std::unique_ptr;
29 ApplicationServer::ApplicationServer(
const string& name,
const string& host,
const uint16_t port,
const unsigned int maxCCU,
int pathFindingThreadCount) :
UDPServer(name, host, port, maxCCU), pathFindingThreadCount(pathFindingThreadCount) {
34 Console::println(
"ApplicationServer::ApplicationServer(): Starting WS UDP server @ " +
host +
":" + to_string(
port));
38 Console::println(
"ApplicationServer::createContext()");
44 Console::println(
"ApplicationServer::ApplicationServer(): Initializing");
58 Console::println(
"ApplicationServer::ApplicationServer(): Starting game logic thread");
66 Console::println(
"ApplicationServer::~ApplicationServer(): Shutting down");
77 Console::println(
"Accepting client connection with '" + ip +
":" + to_string(
port) +
"'");
Application server client.
friend class ApplicationServerClient
virtual UDPServerClient * accept(const uint32_t clientId, const string &ip, const uint16_t port) override
Accept.
virtual void start() override
Starts this objects thread.
unique_ptr< ServerThread > logicsThread
unique_ptr< Context > context
virtual void setupLogics()=0
Setup default / minumum required logics.
int pathFindingThreadCount
virtual Context * createContext()
Create context.
virtual ~ApplicationServer()
Destructor.
Application server thread.
Dynamic physics world class.
void setIOThreadCount(int ioThreadCount)
Sets up the numbers of threads to handle IO and framing.
void setWorkerThreadCount(int workerThreadCount)
Sets up the number of workers that handle requests in thread pool.
Base class for network UDP server clients.
Base class for network UDP servers.