DDraceNetwork Docs
register.h
Go to the documentation of this file.
1
#ifndef ENGINE_SERVER_REGISTER_H
2
#define ENGINE_SERVER_REGISTER_H
3
4
class
CConfig
;
5
class
IConsole
;
6
class
IEngine
;
7
class
IHttp
;
8
struct
CNetChunk
;
9
10
class
IRegister
11
{
12
public
:
13
virtual
~IRegister
() {}
14
15
virtual
void
Update
() = 0;
16
// Call `OnConfigChange` if you change relevant config variables
17
// without going through the console.
18
virtual
void
OnConfigChange
() = 0;
19
// Returns `true` if the packet was a packet related to registering
20
// code and doesn't have to processed furtherly.
21
virtual
bool
OnPacket
(
const
CNetChunk
*pPacket) = 0;
22
// `pInfo` must be an encoded JSON object.
23
virtual
void
OnNewInfo
(
const
char
*pInfo) = 0;
24
virtual
void
OnShutdown
() = 0;
25
};
26
27
IRegister
*
CreateRegister
(
CConfig
*pConfig,
IConsole
*pConsole,
IEngine
*pEngine,
IHttp
*pHttp,
int
ServerPort,
unsigned
SixupSecurityToken);
28
29
#endif
CConfig
Definition:
config.h:23
IConsole
Definition:
console.h:18
IEngine
Definition:
engine.h:15
IHttp
Definition:
http.h:12
IRegister
Definition:
register.h:11
IRegister::Update
virtual void Update()=0
IRegister::~IRegister
virtual ~IRegister()
Definition:
register.h:13
IRegister::OnNewInfo
virtual void OnNewInfo(const char *pInfo)=0
IRegister::OnConfigChange
virtual void OnConfigChange()=0
IRegister::OnShutdown
virtual void OnShutdown()=0
IRegister::OnPacket
virtual bool OnPacket(const CNetChunk *pPacket)=0
CreateRegister
IRegister * CreateRegister(CConfig *pConfig, IConsole *pConsole, IEngine *pEngine, IHttp *pHttp, int ServerPort, unsigned SixupSecurityToken)
Definition:
register.cpp:780
CNetChunk
Definition:
network.h:129
src
engine
server
register.h
Generated by
1.9.4