From bd3a6a04601749cbde007eaabf803fb602ee2783 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Thu, 19 Jun 2025 03:13:48 -0300 Subject: beginning of `communication.cc` --- src/communication.hh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/communication.hh (limited to 'src/communication.hh') diff --git a/src/communication.hh b/src/communication.hh new file mode 100644 index 0000000..a54f704 --- /dev/null +++ b/src/communication.hh @@ -0,0 +1,31 @@ +#ifndef TIBIA_COMMUNICATION_HH_ +#define TIBIA_COMMUNICATION_HH_ 1 + +#include "common.hh" +#include "connections.hh" + +struct TWaitinglistEntry { + TWaitinglistEntry *Next; + char Name[30]; + uint32 NextTry; + bool FreeAccount; + bool Newbie; + bool Sleeping; +}; + +void GetCommunicationThreadStack(int *StackNumber, void **Stack); +void AttachCommunicationThreadStack(int StackNumber); +void ReleaseCommunicationThreadStack(int StackNumber); +void InitCommunicationThreadStacks(void); +void ExitCommunicationThreadStacks(void); + +void InitLoadHistory(void); +bool LagDetected(void); +void NetLoad(int Amount, bool Send); +void NetLoadSummary(void); +void NetLoadCheck(void); + +bool WriteToSocket(TConnection *Connection, uint8 *Buffer, int Size); +bool SendLoginMessage(TConnection *Connection, int Type, char *Message, int WaitingTime); + +#endif //TIBIA_COMMUNICATION_HH_ -- cgit v1.2.3