libUTL++
NetCmdServer.h
1 #pragma once
2 
4 
5 #include <libutl/NetServer.h>
6 
8 
9 UTL_NS_BEGIN;
10 
12 
13 class NetServerClient;
14 
16 
24 
26 class NetCmdServer : public NetServer
27 {
30 
31 public:
32  NetCmdServer(size_t maxClients, size_t maxPaused, size_t clientsPerThread = 1)
33  : NetServer(maxClients, maxPaused, clientsPerThread)
34  {
35  }
36 
37 private:
38  virtual void clientReadMsg(NetServerClient* client);
39  virtual void handleCmd(NetServerClient* client, const Array& cmd) = 0;
40 };
41 
43 
44 UTL_NS_END;
#define UTL_CLASS_DEFID
Default init() and deInit() (which are merely place-holders).
Definition: macros.h:532
SortedCollection that stores objects in an array.
Definition: Array.h:116
Client connection to NetServer.
Abstract base for networked server that accepts commands represented as Array objects.
Definition: NetCmdServer.h:26
#define UTL_CLASS_DECL_ABC(DC, BC)
Declaration of standard UTL++ functionality for an abstract base class (ABC).
Definition: macros.h:650
Abstract base for multi-threaded network server.