r5sdk/r5dev/engine/client/cl_rcon.h
Kawe Mazidjatari f2783ae93f Make use of 'CConnectedNetConsoleData::m_bInputOnly' properly
This member was in the class when RCON was added to the r5sdk, but it was never utilized. Now, each netconsole can toggle whether they are input only or not, the server only sends logs to netconsoles that are not input only. This patch also contains a fix in which the listen server sends logs to the client of its own process, causing an infinite recursive call to DevMsg.
2023-08-04 17:28:01 +02:00

38 lines
900 B
C++

#pragma once
#include "tier1/NetAdr.h"
#include "tier2/socketcreator.h"
#include "protoc/sv_rcon.pb.h"
#include "protoc/cl_rcon.pb.h"
#include "engine/shared/base_rcon.h"
class CRConClient : public CNetConBase
{
public:
CRConClient(void);
~CRConClient(void);
void Init(void);
void Shutdown(void);
void RunFrame(void);
virtual void Disconnect(const char* szReason = nullptr) override;
virtual bool ProcessMessage(const char* pMsgBuf, const int nMsgLen) override;
bool Serialize(vector<char>& vecBuf, const char* szReqBuf,
const char* szReqVal, const cl_rcon::request_t requestType) const;
void RequestConsoleLog(const bool bWantLog);
bool ShouldReceive(void);
bool IsRemoteLocal(void);
bool IsInitialized(void) const;
bool IsConnected(void);
CConnectedNetConsoleData* GetData(void);
SocketHandle_t GetSocket(void);
private:
bool m_bInitialized;
};
CRConClient* RCONClient();