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.

References ~C4Network2ResLoad().

132  : iChunk(inChunk), Timestamp(time(nullptr)), iByClient(inByClient), pNext(nullptr)
133 {
134 
135 }
C4Network2ResLoad * pNext
Here is the call graph for this function:

◆ ~C4Network2ResLoad()

C4Network2ResLoad::~C4Network2ResLoad ( )
default

Referenced by C4Network2ResLoad().

Here is the caller graph for this function:

Member Function Documentation

◆ CheckTimeout()

bool C4Network2ResLoad::CheckTimeout ( )

Definition at line 139 of file C4Network2Res.cpp.

References C4NetResLoadTimeout, C4Network2ResChunkData::C4Network2ResChunkData(), and Timestamp.

140 {
141  return difftime(time(nullptr), Timestamp) >= C4NetResLoadTimeout;
142 }
const int32_t C4NetResLoadTimeout
Definition: C4Network2Res.h:34
Here is the call graph for this function:

◆ getByClient()

int32_t C4Network2ResLoad::getByClient ( ) const
inline

Definition at line 127 of file C4Network2Res.h.

127 { return iByClient; }

◆ getChunk()

int32_t C4Network2ResLoad::getChunk ( ) const
inline

Definition at line 126 of file C4Network2Res.h.

126 { return iChunk; }

◆ Next()

C4Network2ResLoad* C4Network2ResLoad::Next ( ) const
inline

Definition at line 129 of file C4Network2Res.h.

References C4Network2Res::pNext.

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

129 { return pNext; }
C4Network2ResLoad * pNext
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.

◆ iChunk

int32_t C4Network2ResLoad::iChunk
protected

Definition at line 118 of file C4Network2Res.h.

◆ pNext

C4Network2ResLoad* C4Network2ResLoad::pNext
protected

Definition at line 123 of file C4Network2Res.h.

Referenced by 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: