GekkoNet 1.0
C/C++ Peer to Peer Game Networking SDK
Loading...
Searching...
No Matches
Gekko::NetStats Struct Reference

#include <net.h>

Collaboration diagram for Gekko::NetStats:

Public Member Functions

void AddRTT (u16 rtt_ms)
void UpdateBandwidth ()
float CalculateJitter ()
float CalculateAvgRTT ()
u32 LastRTT ()

Public Attributes

Frame last_acked_frame = -1
u64 last_sent_sync_message = 0
u64 last_received_message = 0
u64 last_received_frame = 0
float kb_sent_per_sec = 0
float kb_received_per_sec = 0
u32 bytes_sent_accum = 0
u32 bytes_received_accum = 0
u64 last_bandwidth_update = 0
std::vector< u16 > rtt

Static Public Attributes

static const u64 DISCONNECT_TIMEOUT = 5000
static const u64 DISCONNECT_MSG_DELAY = 200
static const u64 DISCONNECT_CLAIM_HOLD = 2000
static const u64 SYNC_MSG_DELAY = 200
static const u64 NET_CHECK_DELAY = 500
static const u64 INPUT_RETRY_INTERVAL = 200
static const u32 RTT_HISTORY_SIZE = 10

Detailed Description

Definition at line 121 of file net.h.

Member Function Documentation

◆ AddRTT()

void Gekko::NetStats::AddRTT ( u16 rtt_ms)

Definition at line 84 of file net.cpp.

◆ CalculateAvgRTT()

float Gekko::NetStats::CalculateAvgRTT ( )

Definition at line 69 of file net.cpp.

◆ CalculateJitter()

float Gekko::NetStats::CalculateJitter ( )

Definition at line 54 of file net.cpp.

◆ LastRTT()

u32 Gekko::NetStats::LastRTT ( )

Definition at line 112 of file net.cpp.

◆ UpdateBandwidth()

void Gekko::NetStats::UpdateBandwidth ( )

Definition at line 92 of file net.cpp.

Member Data Documentation

◆ bytes_received_accum

u32 Gekko::NetStats::bytes_received_accum = 0

Definition at line 138 of file net.h.

◆ bytes_sent_accum

u32 Gekko::NetStats::bytes_sent_accum = 0

Definition at line 137 of file net.h.

◆ DISCONNECT_CLAIM_HOLD

const u64 Gekko::NetStats::DISCONNECT_CLAIM_HOLD = 2000
static

Definition at line 124 of file net.h.

◆ DISCONNECT_MSG_DELAY

const u64 Gekko::NetStats::DISCONNECT_MSG_DELAY = 200
static

Definition at line 123 of file net.h.

◆ DISCONNECT_TIMEOUT

const u64 Gekko::NetStats::DISCONNECT_TIMEOUT = 5000
static

Definition at line 122 of file net.h.

◆ INPUT_RETRY_INTERVAL

const u64 Gekko::NetStats::INPUT_RETRY_INTERVAL = 200
static

Definition at line 127 of file net.h.

◆ kb_received_per_sec

float Gekko::NetStats::kb_received_per_sec = 0

Definition at line 136 of file net.h.

◆ kb_sent_per_sec

float Gekko::NetStats::kb_sent_per_sec = 0

Definition at line 135 of file net.h.

◆ last_acked_frame

Frame Gekko::NetStats::last_acked_frame = -1

Definition at line 130 of file net.h.

◆ last_bandwidth_update

u64 Gekko::NetStats::last_bandwidth_update = 0

Definition at line 139 of file net.h.

◆ last_received_frame

u64 Gekko::NetStats::last_received_frame = 0

Definition at line 133 of file net.h.

◆ last_received_message

u64 Gekko::NetStats::last_received_message = 0

Definition at line 132 of file net.h.

◆ last_sent_sync_message

u64 Gekko::NetStats::last_sent_sync_message = 0

Definition at line 131 of file net.h.

◆ NET_CHECK_DELAY

const u64 Gekko::NetStats::NET_CHECK_DELAY = 500
static

Definition at line 126 of file net.h.

◆ rtt

std::vector<u16> Gekko::NetStats::rtt

Definition at line 141 of file net.h.

◆ RTT_HISTORY_SIZE

const u32 Gekko::NetStats::RTT_HISTORY_SIZE = 10
static

Definition at line 128 of file net.h.

◆ SYNC_MSG_DELAY

const u64 Gekko::NetStats::SYNC_MSG_DELAY = 200
static

Definition at line 125 of file net.h.


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