wavelength 1.0.0
Loading...
Searching...
No Matches
inetcheckconnectionresultmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
5#include "os/mem.h"
6
14public:
16 static constexpr int kResultDown = -91;
17
25 explicit InetCheckConnectionResultMsg(int nResult) : mResult(nResult) {
26 }
27
33 ~InetCheckConnectionResultMsg() override = default;
34
41 void *operator new(size_t nSize) {
42 return PoolMemAlloc(static_cast<int>(nSize), "InetCheckConnectionResultMsg", 0);
43 }
44
50 void operator delete(void *pBlock) {
51 PoolMemFree(pBlock);
52 }
53
61 Message *Clone() override {
62 return new InetCheckConnectionResultMsg(*this);
63 }
64
72 int Type() override {
74 }
75
83 const char *GetName() const override {
84 return "InetCheckConnectionResultMsg";
85 }
86
88 int GetResult() const {
89 return mResult;
90 }
91
92private:
93 int mResult;
94};
int Type() override
Report this message's registered identity.
Definition inetcheckconnectionresultmsg.h:72
InetCheckConnectionResultMsg(int nResult)
Construct a result.
Definition inetcheckconnectionresultmsg.h:25
int GetResult() const
Definition inetcheckconnectionresultmsg.h:88
static constexpr int kResultDown
The value of mResult when the connection is down.
Definition inetcheckconnectionresultmsg.h:16
~InetCheckConnectionResultMsg() override=default
Destroy the object.
Message * Clone() override
Produce a heap copy of this message.
Definition inetcheckconnectionresultmsg.h:61
const char * GetName() const override
Report this message's class name.
Definition inetcheckconnectionresultmsg.h:83
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
int g_nInetCheckConnectionResultMsgType
Identity that InetCheckConnectionResultMsg::Type() reports.
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.