OpenClonk
C4Network2ResLoad Class Reference

#include <C4Network2Res.h>

Collaboration diagram for C4Network2ResLoad:
[legend]

Public Member Functions

 C4Network2ResLoad (int32_t iChunk, int32_t iByClient)
 
 ~C4Network2ResLoad ()
 
int32_t getChunk () const
 
int32_t getByClient () const
 
C4Network2ResLoadNext () const
 
bool CheckTimeout ()
 

Protected Attributes

int32_t iChunk
 
time_t Timestamp
 
int32_t iByClient
 
C4Network2ResLoadpNext
 

Friends

class C4Network2Res
 

Detailed Description

Definition at line 109 of file C4Network2Res.h.

Constructor & Destructor Documentation

◆ C4Network2ResLoad()

C4Network2ResLoad::C4Network2ResLoad ( int32_t  iChunk,
int32_t  iByClient 
)

Definition at line 131 of file C4Network2Res.cpp.

132  : iChunk(inChunk), Timestamp(time(nullptr)), iByClient(inByClient), pNext(nullptr)
133 {
134 
135 }
C4Network2ResLoad * pNext

◆ ~C4Network2ResLoad()

C4Network2ResLoad::~C4Network2ResLoad ( )
default

Member Function Documentation

◆ CheckTimeout()

bool C4Network2ResLoad::CheckTimeout ( )

Definition at line 139 of file C4Network2Res.cpp.

140 {
141  return difftime(time(nullptr), Timestamp) >= C4NetResLoadTimeout;
142 }
const int32_t C4NetResLoadTimeout
Definition: C4Network2Res.h:34

References C4NetResLoadTimeout, and Timestamp.

◆ getByClient()

int32_t C4Network2ResLoad::getByClient ( ) const
inline

Definition at line 127 of file C4Network2Res.h.

127 { return iByClient; }

References iByClient.

◆ getChunk()

int32_t C4Network2ResLoad::getChunk ( ) const
inline

Definition at line 126 of file C4Network2Res.h.

126 { return iChunk; }

References iChunk.

◆ Next()

C4Network2ResLoad* C4Network2ResLoad::Next ( ) const
inline

Definition at line 129 of file C4Network2Res.h.

129 { return pNext; }

References pNext.

Referenced by C4Network2Res::RemoveLoad(), and C4Network2Res::StartLoad().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ C4Network2Res

friend class C4Network2Res
friend

Definition at line 111 of file C4Network2Res.h.

Member Data Documentation

◆ iByClient

int32_t C4Network2ResLoad::iByClient
protected

Definition at line 120 of file C4Network2Res.h.

Referenced by getByClient().

◆ iChunk

int32_t C4Network2ResLoad::iChunk
protected

Definition at line 118 of file C4Network2Res.h.

Referenced by getChunk().

◆ pNext

C4Network2ResLoad* C4Network2ResLoad::pNext
protected

Definition at line 123 of file C4Network2Res.h.

Referenced by Next(), C4Network2Res::RemoveLoad(), and C4Network2Res::StartLoad().

◆ Timestamp

time_t C4Network2ResLoad::Timestamp
protected

Definition at line 119 of file C4Network2Res.h.

Referenced by CheckTimeout().


The documentation for this class was generated from the following files: