TDME2  1.9.200
ServerGroupBase.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include <tdme/tdme.h>
8 
9 using std::string;
10 
13 
14 namespace tdme {
15 namespace network {
16 namespace udpserver {
17 
18 /**
19  * Base class for network server group
20  * @author Andreas Drewke
21  */
22 class ServerGroupBase : public Reference {
23 friend class ServerWorkerThread;
24 
25 protected:
26  /*
27  * @brief event method called if group will be initiated, will be called from worker
28  */
29  virtual void onInit() = 0;
30 
31  /*
32  * @brief event method called if client will be closed, will be called from worker
33  */
34  virtual void onClose() = 0;
35 
36  /*
37  * @brief custom event method called if fired, will be called from worker
38  */
39  virtual void onCustomEvent(const string& type) = 0;
40 };
41 
42 };
43 };
44 };
Base class for network server group.
virtual void onCustomEvent(const string &type)=0
Reference counter implementation to be used with inheritance.
Definition: Reference.h:13
std::exception Exception
Exception base class.
Definition: Exception.h:18
Definition: fwd-tdme.h:4