wavelength 1.0.0
Loading...
Searching...
No Matches
initmgcltask.h
Go to the documentation of this file.
1#pragma once
2
3#include <librtmgcl.h>
4
5#include "netflow/nettask.h"
6
13class InitMGCLTask : public NetTask {
14public:
21 ~InitMGCLTask() override = default;
22
34 static int
35 OnServerRequest0(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest);
36
48 static int
49 OnServerRequest1(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest);
50
62 static int
63 OnServerRequest2(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest);
64
76 static int
77 OnServerRequest3(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest);
78
79protected:
86 void OnStart() override;
87};
Step that starts the game server library and its peer-to-peer layer.
Definition initmgcltask.h:13
~InitMGCLTask() override=default
Destroy the object.
static int OnServerRequest0(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest)
Ignore the first kind of request of the game server.
static int OnServerRequest1(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest)
Accept the second kind of request of the game server with an empty reply.
static int OnServerRequest2(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest)
Ignore the third kind of request of the game server.
static int OnServerRequest3(int nConnection, int nType, int nSize, const rtMgclResponse *pRequest)
Ignore the fourth kind of request of the game server.
void OnStart() override
Start the library, note whether it is ready, and finish.
NetTask()
Construct a task outside any NetMultiTask.
Definition nettask.h:24