Planeshift
Public Member Functions | Public Attributes

NetBase::Connection Class Reference

This class holds data for a connection. More...

#include <netbase.h>

List of all members.

Public Member Functions

void AddToWindow (uint32_t bytes)
 Add to window when reliable data is in transit.
 Connection (uint32_t num=0)
uint32_t GetNextPacketID ()
bool isValid () const
bool IsWindowFull ()
 Check if the reliable transmission window is full.
void RemoveFromWindow (uint32_t bytes)
 Remove from transmission window when an ack is received.
 ~Connection ()

Public Attributes

SOCKADDR_IN addr
 The INet Adress of the client.
void * buf
 buffer for split up packets, allocated when needed
uint32_t clientnum
 the client num
float devRTT
 RTT deviance.
float estRTT
 Estimated RTT.
int heartbeat
 number of attempts to keep alive connection without ack response
int historypos
csTicks lastRecvPacketTime
 last time packet was received from this connection
csString nameAddr
 The adress if provided, usually in clients, else an empty csstring.
csHash< uint32_t > packethistoryhash
uint32_t packethistoryid [MAXPACKETHISTORY]
 keeps track of received packets to drop doubled packets
uint32_t packethistoryoffset [MAXPACKETHISTORY]
int pcknumin
 The Number of the last incoming packet.
int pcknumout
 The Number of the last outgoing packet.
uint32_t resends
 Number of resends.
csTicks RTO
 timeout
uint32_t sends
 Number of reliable sends.
bool valid
 Is this already a valid connection?
uint32_t window

Detailed Description

This class holds data for a connection.

Definition at line 684 of file netbase.h.


Constructor & Destructor Documentation

NetBase::Connection::Connection ( uint32_t  num = 0)
NetBase::Connection::~Connection ( )

Member Function Documentation

void NetBase::Connection::AddToWindow ( uint32_t  bytes) [inline]

Add to window when reliable data is in transit.

Definition at line 736 of file netbase.h.

uint32_t NetBase::Connection::GetNextPacketID ( ) [inline]

Definition at line 731 of file netbase.h.

bool NetBase::Connection::isValid ( ) const [inline]

Definition at line 728 of file netbase.h.

bool NetBase::Connection::IsWindowFull ( ) [inline]

Check if the reliable transmission window is full.

Definition at line 734 of file netbase.h.

void NetBase::Connection::RemoveFromWindow ( uint32_t  bytes) [inline]

Remove from transmission window when an ack is received.

Definition at line 738 of file netbase.h.


Member Data Documentation

The INet Adress of the client.

Definition at line 692 of file netbase.h.

buffer for split up packets, allocated when needed

Definition at line 690 of file netbase.h.

the client num

Definition at line 702 of file netbase.h.

RTT deviance.

Definition at line 710 of file netbase.h.

Estimated RTT.

Definition at line 708 of file netbase.h.

number of attempts to keep alive connection without ack response

Definition at line 706 of file netbase.h.

Definition at line 724 of file netbase.h.

last time packet was received from this connection

Definition at line 704 of file netbase.h.

The adress if provided, usually in clients, else an empty csstring.

Definition at line 694 of file netbase.h.

Definition at line 688 of file netbase.h.

uint32_t NetBase::Connection::packethistoryid[MAXPACKETHISTORY]

keeps track of received packets to drop doubled packets

Definition at line 722 of file netbase.h.

uint32_t NetBase::Connection::packethistoryoffset[MAXPACKETHISTORY]

Definition at line 723 of file netbase.h.

The Number of the last incoming packet.

Definition at line 696 of file netbase.h.

The Number of the last outgoing packet.

Definition at line 698 of file netbase.h.

Number of resends.

Definition at line 716 of file netbase.h.

timeout

Definition at line 712 of file netbase.h.

Number of reliable sends.

Definition at line 714 of file netbase.h.

Is this already a valid connection?

Definition at line 700 of file netbase.h.

Definition at line 719 of file netbase.h.


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