OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4NetIOUDP::Peer Class Reference

#include <C4NetIO.h>

Collaboration diagram for C4NetIOUDP::Peer:
[legend]

Public Member Functions

 Peer (const C4NetIO::addr_t &naddr, C4NetIOUDP *pnParent)
 
 ~Peer ()
 
const C4NetIO::addr_tGetAddr () const
 
const C4NetIO::addr_tGetAltAddr () const
 
bool Connect (bool fFailCallback)
 
bool Send (const C4NetIOPacket &rPacket)
 
bool Check (bool fForceCheck=true)
 
void OnRecv (const C4NetIOPacket &Packet)
 
void Close (const char *szReason)
 
bool Open () const
 
bool Closed () const
 
bool MultiCast () const
 
unsigned int GetMCAckPacketCounter () const
 
C4TimeMilliseconds GetTimeout ()
 
void CheckTimeout ()
 
bool doBroadcast () const
 
void SetBroadcast (bool fSet)
 
void SetAltAddr (const C4NetIO::addr_t &naddr2)
 
int GetIRate () const
 
int GetORate () const
 
int GetLoss () const
 
void ClearStatistics ()
 

Public Attributes

PeerNext
 

Protected Types

enum  ConnStatus { CS_None, CS_Conn, CS_Works, CS_Closed }
 

Protected Member Functions

bool DoConn (bool fMC)
 
bool DoCheck (int iAskCnt=0, int iMCAskCnt=0, unsigned int *pAskList=nullptr)
 
bool SendDirect (const Packet &rPacket, unsigned int iNr=~0)
 
bool SendDirect (C4NetIOPacket &&rPacket)
 
void OnConn ()
 
void OnClose (const char *szReason)
 
void CheckCompleteIPackets ()
 
void SetTimeout (int iLength=iStdTimeout, int iRetryCnt=0)
 
void OnTimeout ()
 

Protected Attributes

C4NetIOUDP *const pParent
 
C4NetIO::addr_t addr
 
C4NetIO::addr_t addr2
 
addr_t PeerAddr
 
enum C4NetIOUDP::Peer::ConnStatus eStatus
 
bool fMultiCast
 
bool fDoBroadcast
 
bool fConnFailCallback
 
PacketList OPackets
 
PacketList IPackets
 
PacketList IMCPackets
 
unsigned int iOPacketCounter
 
unsigned int iIPacketCounter
 
unsigned int iRIPacketCounter
 
unsigned int iIMCPacketCounter
 
unsigned int iRIMCPacketCounter
 
unsigned int iMCAckPacketCounter
 
CStdCSec OutCSec
 
C4TimeMilliseconds tNextReCheck
 
unsigned int iLastPacketAsked
 
unsigned int iLastMCPacketAsked
 
C4TimeMilliseconds tTimeout
 
unsigned int iRetries
 
int iIRate
 
int iORate
 
int iLoss
 
CStdCSec StatCSec
 

Static Protected Attributes

static const unsigned int iConnectRetries = 5
 
static const unsigned int iReCheckInterval = 1000
 

Detailed Description

Definition at line 717 of file C4NetIO.h.

Member Enumeration Documentation

Enumerator
CS_None 
CS_Conn 
CS_Works 
CS_Closed 

Definition at line 741 of file C4NetIO.h.

Constructor & Destructor Documentation

C4NetIOUDP::Peer::Peer ( const C4NetIO::addr_t naddr,
C4NetIOUDP pnParent 
)

Definition at line 3099 of file C4NetIO.cpp.

3100  : pParent(pnParent), addr(naddr),
3101  eStatus(CS_None),
3102  fMultiCast(false), fDoBroadcast(false),
3104  iOPacketCounter(0),
3109  iIRate(0), iORate(0), iLoss(0)
3110 {
3111 }
unsigned int iMCAckPacketCounter
Definition: C4NetIO.h:762
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
unsigned int iIMCPacketCounter
Definition: C4NetIO.h:760
static const unsigned int iMaxOPacketBacklog
Definition: C4NetIO.h:639
unsigned int iRIPacketCounter
Definition: C4NetIO.h:759
unsigned int iIPacketCounter
Definition: C4NetIO.h:759
C4NetIOUDP *const pParent
Definition: C4NetIO.h:732
enum C4NetIOUDP::Peer::ConnStatus eStatus
unsigned int iOPacketCounter
Definition: C4NetIO.h:758
bool fDoBroadcast
Definition: C4NetIO.h:749
PacketList OPackets
Definition: C4NetIO.h:754
unsigned int iRIMCPacketCounter
Definition: C4NetIO.h:760
C4TimeMilliseconds tNextReCheck
Definition: C4NetIO.h:768
C4NetIOUDP::Peer::~Peer ( )

Definition at line 3113 of file C4NetIO.cpp.

References C4NetIOUDP::Close().

3114 {
3115  // send close-packet
3116  Close("deleted");
3117 }
void Close(const char *szReason)
Definition: C4NetIO.cpp:3396

Here is the call graph for this function:

Member Function Documentation

bool C4NetIOUDP::Peer::Check ( bool  fForceCheck = true)

Definition at line 3148 of file C4NetIO.cpp.

References C4NetIOUDP::DoCheck(), C4TimeMilliseconds::NegativeInfinity, and C4TimeMilliseconds::Now().

3149 {
3150  // only on working connections
3151  if (eStatus != CS_Works) return true;
3152  // prevent re-check (check floods)
3153  // instead, ask for other packets that are missing until recheck is allowed
3154  bool fNoReCheck = tNextReCheck > C4TimeMilliseconds::Now();
3155  if (!fNoReCheck) iLastPacketAsked = iLastMCPacketAsked = 0;
3156  unsigned int iStartAt = fNoReCheck ? std::max(iLastPacketAsked + 1, iIPacketCounter) : iIPacketCounter;
3157  unsigned int iStartAtMC = fNoReCheck ? std::max(iLastMCPacketAsked + 1, iIMCPacketCounter) : iIMCPacketCounter;
3158  // check if we have something to ask for
3159  const unsigned int iMaxAskCnt = 10;
3160  unsigned int i, iAskList[iMaxAskCnt], iAskCnt = 0, iMCAskCnt = 0;
3161  for (i = iStartAt; i < iRIPacketCounter; i++)
3162  if (!IPackets.FragmentPresent(i))
3163  if (iAskCnt < iMaxAskCnt)
3164  iLastPacketAsked = iAskList[iAskCnt++] = i;
3165  for (i = iStartAtMC; i < iRIMCPacketCounter; i++)
3166  if (!IMCPackets.FragmentPresent(i))
3167  if (iAskCnt + iMCAskCnt < iMaxAskCnt)
3168  iLastMCPacketAsked = iAskList[iAskCnt + iMCAskCnt++] = i;
3169  int iEAskCnt = iAskCnt + iMCAskCnt;
3170  // no re-check limit? set it
3171  if (!fNoReCheck)
3172  {
3173  if (iEAskCnt)
3175  else
3177  }
3178  // something to ask for? (or check forced?)
3179  if (iEAskCnt || fForceCheck)
3180  return DoCheck(iAskCnt, iMCAskCnt, iAskList);
3181  return true;
3182 }
unsigned int iLastMCPacketAsked
Definition: C4NetIO.h:769
unsigned int iLastPacketAsked
Definition: C4NetIO.h:769
unsigned int iIMCPacketCounter
Definition: C4NetIO.h:760
static const unsigned int iReCheckInterval
Definition: C4NetIO.h:729
bool DoCheck(int iAskCnt=0, int iMCAskCnt=0, unsigned int *pAskList=nullptr)
Definition: C4NetIO.cpp:3444
unsigned int iRIPacketCounter
Definition: C4NetIO.h:759
bool FragmentPresent(unsigned int iNr)
Definition: C4NetIO.cpp:3025
unsigned int iIPacketCounter
Definition: C4NetIO.h:759
PacketList IPackets
Definition: C4NetIO.h:755
enum C4NetIOUDP::Peer::ConnStatus eStatus
PacketList IMCPackets
Definition: C4NetIO.h:755
unsigned int iRIMCPacketCounter
Definition: C4NetIO.h:760
C4TimeMilliseconds tNextReCheck
Definition: C4NetIO.h:768
static C4TimeMilliseconds Now()

Here is the call graph for this function:

void C4NetIOUDP::Peer::CheckCompleteIPackets ( )
protected

Definition at line 3519 of file C4NetIO.cpp.

References C4NetIOUDP::Packet::FragmentCnt(), C4NetIOUDP::Packet::GetData(), and C4NetIOUDP::Packet::GetNr().

3520 {
3521  // only status CS_Works
3522  if (eStatus != CS_Works) return;
3523  // (If the status is CS_Conn, we'll have to wait until the connection in the
3524  // opposite direction is etablished. There is no problem in checking for
3525  // complete packets here, but the one using the interface may get very confused
3526  // if he gets a callback for a connection that hasn't been announced to him
3527  // yet)
3528 
3529  // check for complete incoming packets
3530  Packet *pPkt;
3531  while ((pPkt = IPackets.GetFirstPacketComplete()))
3532  {
3533  // missing packet?
3534  if (pPkt->GetNr() != iIPacketCounter) break;
3535  // do callback
3536  if (pParent->pCB)
3537  pParent->pCB->OnPacket(pPkt->GetData(), pParent);
3538  // advance packet counter
3539  iIPacketCounter = pPkt->GetNr() + pPkt->FragmentCnt();
3540  // remove packet from queue
3541  int iNr = pPkt->GetNr();
3542  IPackets.DeletePacket(pPkt);
3543  assert(!IPackets.GetPacketFrgm(iNr)); (void)iNr;
3544  }
3545  while ((pPkt = IMCPackets.GetFirstPacketComplete()))
3546  {
3547  // missing packet?
3548  if (pPkt->GetNr() != iIMCPacketCounter) break;
3549  // do callback
3550  if (pParent->pCB)
3551  pParent->pCB->OnPacket(pPkt->GetData(), pParent);
3552  // advance packet counter
3553  iIMCPacketCounter = pPkt->GetNr() + pPkt->FragmentCnt();
3554  // remove packet from queue
3555  int iNr = pPkt->GetNr();
3556  IMCPackets.DeletePacket(pPkt);
3557  assert(!IMCPackets.GetPacketFrgm(iNr)); (void)iNr;
3558  }
3559 }
friend class Packet
Definition: C4NetIO.h:687
unsigned int iIMCPacketCounter
Definition: C4NetIO.h:760
Packet * GetFirstPacketComplete()
Definition: C4NetIO.cpp:3019
unsigned int iIPacketCounter
Definition: C4NetIO.h:759
PacketList IPackets
Definition: C4NetIO.h:755
C4NetIOUDP *const pParent
Definition: C4NetIO.h:732
enum C4NetIOUDP::Peer::ConnStatus eStatus
bool DeletePacket(Packet *pPacket)
Definition: C4NetIO.cpp:3056
Packet * GetPacketFrgm(unsigned int iNr)
Definition: C4NetIO.cpp:3008
PacketList IMCPackets
Definition: C4NetIO.h:755

Here is the call graph for this function:

void C4NetIOUDP::Peer::CheckTimeout ( )

Definition at line 3411 of file C4NetIO.cpp.

References C4TimeMilliseconds::Now().

3412 {
3413  // check
3415  OnTimeout();
3416 }
C4TimeMilliseconds tTimeout
Definition: C4NetIO.h:772
static C4TimeMilliseconds Now()

Here is the call graph for this function:

void C4NetIOUDP::Peer::ClearStatistics ( )

Definition at line 3418 of file C4NetIO.cpp.

References C4NetIOUDP::StatCSec.

3419 {
3420  CStdLock StatLock(&StatCSec);
3421  iIRate = iORate = 0;
3422  iLoss = 0;
3423 }
CStdCSec StatCSec
Definition: C4NetIO.h:777
void C4NetIOUDP::Peer::Close ( const char *  szReason)

Definition at line 3396 of file C4NetIO.cpp.

References addr, C4NetIOUDP::ClosePacket::Addr, CS_Closed, eStatus, C4NetIOUDP::IPID_Close, C4NetIOUDP::PacketHdr::Nr, OnClose(), SendDirect(), and C4NetIOUDP::PacketHdr::StatusByte.

Referenced by C4NetIOUDP::Close(), and C4NetIOUDP::ConnectPeer().

3397 {
3398  // already closed?
3399  if (eStatus == CS_Closed)
3400  return;
3401  // send close-packet
3402  ClosePacket Pkt;
3403  Pkt.StatusByte = IPID_Close;
3404  Pkt.Nr = 0;
3405  Pkt.Addr = addr;
3406  SendDirect(C4NetIOPacket(&Pkt, sizeof(Pkt), false, addr));
3407  // callback
3408  OnClose(szReason);
3409 }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
void OnClose(const char *szReason)
Definition: C4NetIO.cpp:3508
enum C4NetIOUDP::Peer::ConnStatus eStatus
bool SendDirect(const Packet &rPacket, unsigned int iNr=~0)
Definition: C4NetIO.cpp:3468

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4NetIOUDP::Peer::Closed ( ) const
inline

Definition at line 800 of file C4NetIO.h.

References CS_Closed, and eStatus.

Referenced by C4NetIOUDP::OnShareFree().

800 { return eStatus == CS_Closed; }
enum C4NetIOUDP::Peer::ConnStatus eStatus

Here is the caller graph for this function:

bool C4NetIOUDP::Peer::Connect ( bool  fFailCallback)

Definition at line 3119 of file C4NetIO.cpp.

References C4NetIOUDP::fMultiCast.

Referenced by C4NetIOUDP::ConnectPeer().

3120 {
3121  // initiate connection (DoConn will set status CS_Conn)
3122  fMultiCast = false; fConnFailCallback = fFailCallback;
3123  return DoConn(false);
3124 }
bool DoConn(bool fMC)
Definition: C4NetIO.cpp:3425
bool fConnFailCallback
Definition: C4NetIO.h:751

Here is the caller graph for this function:

bool C4NetIOUDP::Peer::doBroadcast ( ) const
inline

Definition at line 812 of file C4NetIO.h.

References fDoBroadcast.

Referenced by C4NetIOUDP::Broadcast().

812 { return fDoBroadcast; }
bool fDoBroadcast
Definition: C4NetIO.h:749

Here is the caller graph for this function:

bool C4NetIOUDP::Peer::DoCheck ( int  iAskCnt = 0,
int  iMCAskCnt = 0,
unsigned int *  pAskList = nullptr 
)
protected

Definition at line 3444 of file C4NetIO.cpp.

References C4NetIOUDP::CheckPacketHdr::AckNr, C4NetIOUDP::CheckPacketHdr::AskCount, C4NetIOUDP::iOPacketCounter, C4NetIOUDP::IPID_Check, C4NetIOUDP::CheckPacketHdr::MCAckNr, C4NetIOUDP::CheckPacketHdr::MCAskCount, StdBuf::New(), C4NetIOUDP::PacketHdr::Nr, C4NetIOUDP::Packet, C4NetIOUDP::SendDirect(), C4NetIOUDP::StatCSec, C4NetIOUDP::PacketHdr::StatusByte, and StdBuf::Write().

3445 {
3446  // security
3447  if (!pAskList) iAskCnt = iMCAskCnt = 0;
3448  // statistics
3449  { CStdLock StatLock(&StatCSec); iLoss += iAskCnt + iMCAskCnt; }
3450  // alloc data
3451  int iAskListSize = (iAskCnt + iMCAskCnt) * sizeof(*pAskList);
3452  StdBuf Packet; Packet.New(sizeof(CheckPacketHdr) + iAskListSize);
3453  CheckPacketHdr *pChkPkt = getMBufPtr<CheckPacketHdr>(Packet);
3454  // set up header
3455  pChkPkt->StatusByte = IPID_Check; // (note: always du here, see C4NetIOUDP::DoCheck)
3456  pChkPkt->Nr = iOPacketCounter;
3457  pChkPkt->AckNr = iIPacketCounter;
3458  pChkPkt->MCAckNr = iIMCPacketCounter;
3459  // copy ask list
3460  pChkPkt->AskCount = iAskCnt;
3461  pChkPkt->MCAskCount = iMCAskCnt;
3462  if (pAskList)
3463  Packet.Write(pAskList, iAskListSize, sizeof(CheckPacketHdr));
3464  // send packet
3465  return SendDirect(C4NetIOPacket(Packet, addr));
3466 }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
Definition: StdBuf.h:29
friend class Packet
Definition: C4NetIO.h:687
unsigned int iIMCPacketCounter
Definition: C4NetIO.h:760
unsigned int iIPacketCounter
Definition: C4NetIO.h:759
void New(size_t inSize)
Definition: StdBuf.h:146
void Write(const void *pnData, size_t inSize, size_t iAt=0)
Definition: StdBuf.h:153
unsigned int iOPacketCounter
Definition: C4NetIO.h:758
CStdCSec StatCSec
Definition: C4NetIO.h:777
bool SendDirect(const Packet &rPacket, unsigned int iNr=~0)
Definition: C4NetIO.cpp:3468

Here is the call graph for this function:

bool C4NetIOUDP::Peer::DoConn ( bool  fMC)
protected

Definition at line 3425 of file C4NetIO.cpp.

References C4NetIOUDP::ConnPacket::Addr, C4NetIOUDP::iOPacketCounter, C4NetIOUDP::IPID_Conn, C4NetIOUDP::iStdTimeout, C4NetIOUDP::ConnPacket::MCAddr, C4NetIOUDP::PacketHdr::Nr, C4NetIOUDP::ConnPacket::ProtocolVer, C4NetIOUDP::SendDirect(), and C4NetIOUDP::PacketHdr::StatusByte.

3426 {
3427  // set status
3428  eStatus = CS_Conn;
3429  // set timeout
3431  // send packet (include current outgoing packet counter and mc addr)
3432  ConnPacket Pkt;
3433  Pkt.StatusByte = uint8_t(IPID_Conn) | (fMC ? 0x80 : 0x00);
3434  Pkt.ProtocolVer = pParent->iVersion;
3435  Pkt.Nr = fMC ? pParent->iOPacketCounter : iOPacketCounter;
3436  Pkt.Addr = addr;
3437  if (pParent->fMultiCast)
3438  Pkt.MCAddr = pParent->C4NetIOSimpleUDP::getMCAddr();
3439  else
3440  Pkt.MCAddr = C4NetIO::addr_t();
3441  return SendDirect(C4NetIOPacket(&Pkt, sizeof(Pkt), false, addr));
3442 }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
void SetTimeout(int iLength=iStdTimeout, int iRetryCnt=0)
Definition: C4NetIO.cpp:3561
static const unsigned int iVersion
Definition: C4NetIO.h:631
C4NetIOUDP *const pParent
Definition: C4NetIO.h:732
unsigned int iOPacketCounter
Definition: C4NetIO.h:878
enum C4NetIOUDP::Peer::ConnStatus eStatus
EndpointAddress addr_t
Definition: C4NetIO.h:211
bool fMultiCast
Definition: C4NetIO.h:859
unsigned int iOPacketCounter
Definition: C4NetIO.h:758
bool SendDirect(const Packet &rPacket, unsigned int iNr=~0)
Definition: C4NetIO.cpp:3468
static const unsigned int iStdTimeout
Definition: C4NetIO.h:636
static const unsigned int iConnectRetries
Definition: C4NetIO.h:728

Here is the call graph for this function:

const C4NetIO::addr_t& C4NetIOUDP::Peer::GetAddr ( ) const
inline

Definition at line 781 of file C4NetIO.h.

References addr.

781 { return addr; }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
const C4NetIO::addr_t& C4NetIOUDP::Peer::GetAltAddr ( ) const
inline

Definition at line 782 of file C4NetIO.h.

References addr2.

782 { return addr2; }
C4NetIO::addr_t addr2
Definition: C4NetIO.h:737
int C4NetIOUDP::Peer::GetIRate ( ) const
inline

Definition at line 820 of file C4NetIO.h.

References iIRate.

Referenced by C4NetIOUDP::GetConnStatistic().

820 { return iIRate; }

Here is the caller graph for this function:

int C4NetIOUDP::Peer::GetLoss ( ) const
inline

Definition at line 822 of file C4NetIO.h.

References iLoss.

822 { return iLoss; }
unsigned int C4NetIOUDP::Peer::GetMCAckPacketCounter ( ) const
inline

Definition at line 805 of file C4NetIO.h.

References iMCAckPacketCounter.

Referenced by C4NetIOUDP::ClearMCPackets().

805 { return iMCAckPacketCounter; }
unsigned int iMCAckPacketCounter
Definition: C4NetIO.h:762

Here is the caller graph for this function:

int C4NetIOUDP::Peer::GetORate ( ) const
inline

Definition at line 821 of file C4NetIO.h.

References iORate.

Referenced by C4NetIOUDP::GetConnStatistic().

821 { return iORate; }

Here is the caller graph for this function:

C4TimeMilliseconds C4NetIOUDP::Peer::GetTimeout ( )
inline

Definition at line 808 of file C4NetIO.h.

References tTimeout.

808 { return tTimeout; }
C4TimeMilliseconds tTimeout
Definition: C4NetIO.h:772
bool C4NetIOUDP::Peer::MultiCast ( ) const
inline

Definition at line 802 of file C4NetIO.h.

References fMultiCast.

Referenced by C4NetIOUDP::Broadcast(), and C4NetIOUDP::DoCheck().

802 { return fMultiCast; }

Here is the caller graph for this function:

void C4NetIOUDP::Peer::OnClose ( const char *  szReason)
protected

Definition at line 3508 of file C4NetIO.cpp.

References CS_Closed, and C4NetIO::CBClass::OnDisconn().

Referenced by Close().

3509 {
3510  // do callback
3511  C4NetIO::CBClass *pCB = pParent->pCB;
3512  if (eStatus == CS_Works || (eStatus == CS_Conn && fConnFailCallback))
3513  if (pCB)
3514  pCB->OnDisconn(addr, pParent, szReason);
3515  // set status (this will schedule this peer for deletion)
3516  eStatus = CS_Closed;
3517 }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
C4NetIOUDP *const pParent
Definition: C4NetIO.h:732
bool fConnFailCallback
Definition: C4NetIO.h:751
enum C4NetIOUDP::Peer::ConnStatus eStatus
virtual void OnDisconn(const addr_t &AddrPeer, C4NetIO *pNetIO, const char *szReason)
Definition: C4NetIO.h:220

Here is the call graph for this function:

Here is the caller graph for this function:

void C4NetIOUDP::Peer::OnConn ( )
protected

Definition at line 3491 of file C4NetIO.cpp.

References C4NetIOUDP::Close(), C4NetIO::CBClass::OnConn(), and C4NetIO::TO_INF.

3492 {
3493  // reset timeout
3494  SetTimeout(TO_INF);
3495  // set status
3496  eStatus = CS_Works;
3497  // do callback
3498  C4NetIO::CBClass *pCB = pParent->pCB;
3499  if (pCB && !pCB->OnConn(addr, addr, &PeerAddr, pParent))
3500  {
3501  Close("closed");
3502  return;
3503  }
3504  // do packet callback (in case the peer sent data while the connection was in progress)
3506 }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
addr_t PeerAddr
Definition: C4NetIO.h:739
void SetTimeout(int iLength=iStdTimeout, int iRetryCnt=0)
Definition: C4NetIO.cpp:3561
virtual bool OnConn(const addr_t &AddrPeer, const addr_t &AddrConnect, const addr_t *pOwnAddr, C4NetIO *pNetIO)
Definition: C4NetIO.h:219
void Close(const char *szReason)
Definition: C4NetIO.cpp:3396
C4NetIOUDP *const pParent
Definition: C4NetIO.h:732
void CheckCompleteIPackets()
Definition: C4NetIO.cpp:3519
enum C4NetIOUDP::Peer::ConnStatus eStatus
static const int TO_INF
Definition: C4NetIO.h:66

Here is the call graph for this function:

void C4NetIOUDP::Peer::OnRecv ( const C4NetIOPacket Packet)

Definition at line 3184 of file C4NetIO.cpp.

References C4NetIOUDP::CheckPacketHdr::AckNr, C4NetIOUDP::Packet::AddFragment(), C4NetIOUDP::PacketList::AddPacket(), C4NetIOUDP::ConnPacket::Addr, C4NetIOUDP::ConnOKPacket::Addr, C4NetIOUDP::AddAddrPacket::Addr, C4NetIOUDP::ClosePacket::Addr, C4NetIOUDP::CheckPacketHdr::AskCount, CStdLock::Clear(), C4NetIOUDP::PacketList::ClearPackets(), C4NetIOUDP::Close(), C4NetIOUDP::Connect(), CS_Closed, C4NetIOUDP::fMultiCast, C4NetIOUDP::DataPacketHdr::FNr, C4NetIOUDP::PacketList::GetPacket(), StdBuf::getSize(), C4NetIOUDP::iOPacketCounter, C4NetIOUDP::IPID_AddAddr, C4NetIOUDP::IPID_Check, C4NetIOUDP::IPID_Close, C4NetIOUDP::IPID_Conn, C4NetIOUDP::IPID_ConnOK, C4NetIOUDP::IPID_Data, C4NetIOUDP::iUDPHeaderSize, C4NetIOUDP::CheckPacketHdr::MCAckNr, C4NetIOUDP::ConnPacket::MCAddr, C4NetIOUDP::CheckPacketHdr::MCAskCount, C4NetIOUDP::ConnOKPacket::MCM_MC, C4NetIOUDP::ConnOKPacket::MCM_MCOK, C4NetIOUDP::ConnOKPacket::MCM_NoMC, C4NetIOUDP::ConnOKPacket::MCMode, C4TimeMilliseconds::NegativeInfinity, C4NetIOUDP::AddAddrPacket::NewAddr, C4NetIOUDP::PacketHdr::Nr, C4NetIOUDP::OPackets, C4NetIOUDP::OutCSec, C4NetIOUDP::Packet, C4NetIOUDP::ConnPacket::ProtocolVer, C4NetIOUDP::SendDirect(), C4NetIOUDP::StatCSec, and C4NetIOUDP::PacketHdr::StatusByte.

3185 {
3186  // statistics
3187  { CStdLock StatLock(&StatCSec); iIRate += rPacket.getSize() + iUDPHeaderSize; }
3188  // get packet header
3189  if (rPacket.getSize() < sizeof(PacketHdr)) return;
3190  const PacketHdr *pHdr = getBufPtr<PacketHdr>(rPacket);
3191  bool fBroadcasted = !!(pHdr->StatusByte & 0x80);
3192  // save packet nr
3193  (fBroadcasted ? iRIMCPacketCounter : iRIPacketCounter) = std::max<unsigned int>((fBroadcasted ? iRIMCPacketCounter : iRIPacketCounter), pHdr->Nr);
3194 #ifdef C4NETIOUDP_OPT_RECV_CHECK_IMMEDIATE
3195  // do check
3196  if (eStatus == CS_Works)
3197  Check(false);
3198 #endif
3199  // what type of packet is it?
3200  switch (pHdr->StatusByte & 0x7f)
3201  {
3202 
3203  case IPID_Conn:
3204  {
3205  // check size
3206  if (rPacket.getSize() != sizeof(ConnPacket)) break;
3207  const ConnPacket *pPkt = getBufPtr<ConnPacket>(rPacket);
3208  // right version?
3209  if (pPkt->ProtocolVer != pParent->iVersion) break;
3210  if (!fBroadcasted)
3211  {
3212  // Second connection attempt using different address?
3213  if (!PeerAddr.IsNull() && PeerAddr != pPkt->Addr)
3214  {
3215  // Notify peer that he has two addresses to reach this connection.
3216  AddAddrPacket Pkt;
3217  Pkt.StatusByte = IPID_AddAddr;
3218  Pkt.Nr = iOPacketCounter;
3219  Pkt.Addr = PeerAddr;
3220  Pkt.NewAddr = pPkt->Addr;
3221  SendDirect(C4NetIOPacket(&Pkt, sizeof(Pkt), false, addr));
3222  // But do nothing else - don't interfere with this connection
3223  break;
3224  }
3225  // reinit?
3226  else if (eStatus == CS_Works && iIPacketCounter != pPkt->Nr)
3227  {
3228  // close (callback!) ...
3229  OnClose("reconnect"); eStatus = CS_Closed;
3230  // ... and reconnect
3231  Connect(false);
3232  }
3233  // save back the address the peer is using
3234  PeerAddr = pPkt->Addr;
3235  }
3236  // set packet counter
3237  if (fBroadcasted)
3239  else
3240  iRIPacketCounter = iIPacketCounter = pPkt->Nr;
3241  // clear incoming packets
3242  IPackets.Clear();
3243  IMCPackets.Clear();
3244 
3246 
3248  // Activate Multicast?
3249  if (!pParent->fMultiCast)
3250  {
3251  addr_t MCAddr = pPkt->MCAddr;
3252  if (!MCAddr.IsNull())
3253  {
3254  // Init Broadcast (with delayed loopback test)
3255  pParent->fDelayedLoopbackTest = true;
3256  if (!pParent->InitBroadcast(&MCAddr))
3257  pParent->fDelayedLoopbackTest = false;
3258  }
3259  }
3260  // build ConnOk Packet
3261  ConnOKPacket nPack;
3262  bool fullyConnected = false;
3263 
3264  nPack.StatusByte = IPID_ConnOK; // (always du, no mc experiments here)
3265  nPack.Nr = fBroadcasted ? pParent->iOPacketCounter : iOPacketCounter;
3266  nPack.Addr = addr;
3267  if (fBroadcasted)
3268  nPack.MCMode = ConnOKPacket::MCM_MCOK; // multicast send ok
3269  else if (pParent->fMultiCast && addr.GetPort() == pParent->iPort)
3270  nPack.MCMode = ConnOKPacket::MCM_MC; // du ok, try multicast next
3271  else
3272  {
3273  nPack.MCMode = ConnOKPacket::MCM_NoMC; // du ok
3274  // no multicast => we're fully connected now
3275  fullyConnected = true;
3276  }
3277  // send it
3278  SendDirect(C4NetIOPacket(&nPack, sizeof(nPack), false, addr));
3279  // Clients will try sending data from OnConn, so send ConnOK before that.
3280  if (fullyConnected) OnConn();
3281  }
3282  break;
3283 
3284  case IPID_ConnOK:
3285  {
3286  if (eStatus != CS_Conn) break;
3287  // check size
3288  if (rPacket.getSize() != sizeof(ConnOKPacket)) break;
3289  const ConnOKPacket *pPkt = getBufPtr<ConnOKPacket>(rPacket);
3290  // save port
3291  PeerAddr = pPkt->Addr;
3292  // Needs another Conn/ConnOK-sequence?
3293  switch (pPkt->MCMode)
3294  {
3295  case ConnOKPacket::MCM_MC:
3296  // multicast has to be active
3297  if (pParent->fMultiCast)
3298  {
3299  // already trying to connect via multicast?
3300  if (fMultiCast) break;
3301  // Send another Conn packet back (this time broadcasted to check if multicast works)
3302  fMultiCast = true; DoConn(true);
3303  break;
3304  }
3305  // fallthru
3307  // Connection is established (no multicast support)
3308  fMultiCast = false; OnConn();
3309  break;
3311  // Connection is established (multicast support)
3312  fMultiCast = true; OnConn();
3313  break;
3314  }
3315  }
3316  break;
3317 
3318  case IPID_Data:
3319  {
3320  // get the packet header
3321  if (rPacket.getSize() < sizeof(DataPacketHdr)) return;
3322  const DataPacketHdr *pHdr = getBufPtr<DataPacketHdr>(rPacket);
3323  // already complet?
3324  if (pHdr->Nr < (fBroadcasted ? iIMCPacketCounter : iIPacketCounter)) break;
3325  // find or create packet
3326  bool fAddPacket = false;
3327  PacketList *pPacketList = fBroadcasted ? &IMCPackets : &IPackets;
3328  Packet *pPkt = pPacketList->GetPacket(pHdr->FNr);
3329  if (!pPkt) { pPkt = new Packet(); fAddPacket = true; }
3330  // add the fragment
3331  if (pPkt->AddFragment(rPacket, addr))
3332  {
3333  // add the packet to list
3334  if (fAddPacket) if (!pPacketList->AddPacket(pPkt)) { delete pPkt; break; }
3335  // check for complete packets
3337  }
3338  else
3339  // delete the packet
3340  if (fAddPacket) delete pPkt;
3341  }
3342  break;
3343 
3344  case IPID_Check:
3345  {
3346  // get the packet header
3347  if (rPacket.getSize() < sizeof(CheckPacketHdr)) break;
3348  const CheckPacketHdr *pPkt = getBufPtr<CheckPacketHdr>(rPacket);
3349  // check packet size
3350  if (rPacket.getSize() < sizeof(CheckPacketHdr) + (pPkt->AskCount + pPkt->MCAskCount) * sizeof(int)) break;
3351  // clear all acknowledged packets
3352  CStdLock OutLock(&OutCSec);
3353  OPackets.ClearPackets(pPkt->AckNr);
3354  if (pPkt->MCAckNr > iMCAckPacketCounter)
3355  {
3356  iMCAckPacketCounter = pPkt->MCAckNr;
3358  }
3359  OutLock.Clear();
3360  // read ask list
3361  const int *pAskList = getBufPtr<int>(rPacket, sizeof(CheckPacketHdr));
3362  // send the packets he asks for
3363  unsigned int i;
3364  for (i = 0; i < pPkt->AskCount + pPkt->MCAskCount; i++)
3365  {
3366  // packet available?
3367  bool fMCPacket = i >= pPkt->AskCount;
3368  CStdLock OutLock(fMCPacket ? &pParent->OutCSec : &OutCSec);
3369  Packet *pPkt2Send = (fMCPacket ? pParent->OPackets : OPackets).GetPacketFrgm(pAskList[i]);
3370  if (!pPkt2Send) { Close("starvation"); break; }
3371  // send the fragment
3372  if (fMCPacket)
3373  pParent->BroadcastDirect(*pPkt2Send, pAskList[i]);
3374  else
3375  SendDirect(*pPkt2Send, pAskList[i]);
3376  }
3377  }
3378  break;
3379 
3380  case IPID_Close:
3381  {
3382  // check packet size
3383  if (rPacket.getSize() < sizeof(ClosePacket)) break;
3384  const ClosePacket *pPkt = getBufPtr<ClosePacket>(rPacket);
3385  // ignore if it's for another address
3386  if (!PeerAddr.IsNull() && PeerAddr != pPkt->Addr)
3387  break;
3388  // close
3389  OnClose("connection closed by peer");
3390  }
3391  break;
3392 
3393  }
3394 }
unsigned int iMCAckPacketCounter
Definition: C4NetIO.h:762
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
unsigned int iLastMCPacketAsked
Definition: C4NetIO.h:769
addr_t PeerAddr
Definition: C4NetIO.h:739
bool InitBroadcast(addr_t *pBroadcastAddr) override
Definition: C4NetIO.cpp:2439
friend class Packet
Definition: C4NetIO.h:687
unsigned int iLastPacketAsked
Definition: C4NetIO.h:769
PacketList OPackets
Definition: C4NetIO.h:877
void OnClose(const char *szReason)
Definition: C4NetIO.cpp:3508
unsigned int iIMCPacketCounter
Definition: C4NetIO.h:760
CStdCSec OutCSec
Definition: C4NetIO.h:855
static const unsigned int iUDPHeaderSize
Definition: C4NetIO.h:641
unsigned int iRIPacketCounter
Definition: C4NetIO.h:759
bool Check(bool fForceCheck=true)
Definition: C4NetIO.cpp:3148
void Close(const char *szReason)
Definition: C4NetIO.cpp:3396
unsigned int iIPacketCounter
Definition: C4NetIO.h:759
PacketList IPackets
Definition: C4NetIO.h:755
bool DoConn(bool fMC)
Definition: C4NetIO.cpp:3425
static const unsigned int iVersion
Definition: C4NetIO.h:631
bool fDelayedLoopbackTest
Definition: C4NetIO.h:871
friend class PacketList
Definition: C4NetIO.h:714
uint16_t iPort
Definition: C4NetIO.h:860
C4NetIOUDP *const pParent
Definition: C4NetIO.h:732
unsigned int iOPacketCounter
Definition: C4NetIO.h:878
void CheckCompleteIPackets()
Definition: C4NetIO.cpp:3519
enum C4NetIOUDP::Peer::ConnStatus eStatus
bool BroadcastDirect(const Packet &rPacket, unsigned int iNr=~0u)
Definition: C4NetIO.cpp:3598
EndpointAddress addr_t
Definition: C4NetIO.h:211
bool fMultiCast
Definition: C4NetIO.h:859
void ClearMCPackets()
Definition: C4NetIO.cpp:3676
unsigned int iOPacketCounter
Definition: C4NetIO.h:758
CStdCSec StatCSec
Definition: C4NetIO.h:777
CStdCSec OutCSec
Definition: C4NetIO.h:765
bool SendDirect(const Packet &rPacket, unsigned int iNr=~0)
Definition: C4NetIO.cpp:3468
bool Connect(bool fFailCallback)
Definition: C4NetIO.cpp:3119
PacketList IMCPackets
Definition: C4NetIO.h:755
void ClearPackets(unsigned int iUntil)
Definition: C4NetIO.cpp:3076
PacketList OPackets
Definition: C4NetIO.h:754
unsigned int iRIMCPacketCounter
Definition: C4NetIO.h:760
uint16_t GetPort() const
Definition: C4NetIO.cpp:542
C4TimeMilliseconds tNextReCheck
Definition: C4NetIO.h:768

Here is the call graph for this function:

void C4NetIOUDP::Peer::OnTimeout ( )
protected

Definition at line 3574 of file C4NetIO.cpp.

References C4NetIOUDP::Close(), C4NetIOUDP::fMultiCast, and C4NetIO::TO_INF.

3575 {
3576  // what state?
3577  if (eStatus == CS_Conn)
3578  {
3579  // retries left?
3580  if (iRetries)
3581  {
3582  int iRetryCnt = iRetries - 1;
3583  // call DoConn (will set timeout)
3584  DoConn(fMultiCast);
3585  // set retry count
3586  iRetries = iRetryCnt;
3587  return;
3588  }
3589  // connection timeout: close
3590  Close("connection timeout");
3591  }
3592  // reset timeout
3593  SetTimeout(TO_INF);
3594 }
unsigned int iRetries
Definition: C4NetIO.h:773
void SetTimeout(int iLength=iStdTimeout, int iRetryCnt=0)
Definition: C4NetIO.cpp:3561
void Close(const char *szReason)
Definition: C4NetIO.cpp:3396
bool DoConn(bool fMC)
Definition: C4NetIO.cpp:3425
enum C4NetIOUDP::Peer::ConnStatus eStatus
static const int TO_INF
Definition: C4NetIO.h:66

Here is the call graph for this function:

bool C4NetIOUDP::Peer::Open ( ) const
inline

Definition at line 798 of file C4NetIO.h.

References CS_Works, and eStatus.

Referenced by C4NetIOUDP::Broadcast(), C4NetIOUDP::DoCheck(), and C4NetIOUDP::GetConnStatistic().

798 { return eStatus == CS_Works; }
enum C4NetIOUDP::Peer::ConnStatus eStatus

Here is the caller graph for this function:

bool C4NetIOUDP::Peer::Send ( const C4NetIOPacket rPacket)

Definition at line 3126 of file C4NetIO.cpp.

References C4NetIOUDP::PacketList::AddPacket(), C4NetIOUDP::Close(), C4NetIOPacket::Duplicate(), C4NetIOUDP::Packet::FragmentCnt(), C4NetIOUDP::Packet::GetData(), C4NetIOUDP::iOPacketCounter, C4NetIOUDP::OPackets, C4NetIOUDP::OutCSec, C4NetIOUDP::Packet, C4NetIOUDP::SendDirect(), and C4NetIOPacket::SetAddr().

Referenced by C4NetIOUDP::Broadcast(), and C4NetIOUDP::Send().

3127 {
3128  CStdLock OutLock(&OutCSec);
3129  // encapsulate packet
3130  Packet *pnPacket = new Packet(rPacket.Duplicate(), iOPacketCounter);
3131  iOPacketCounter += pnPacket->FragmentCnt();
3132  pnPacket->GetData().SetAddr(addr);
3133  // add it to outgoing packet stack
3134  if (!OPackets.AddPacket(pnPacket))
3135  return false;
3136  // This should be ensured by calling function anyway.
3137  // It is not secure to send packets before the connection
3138  // is etablished completly.
3139  if (eStatus != CS_Works) return true;
3140  // send it
3141  if (!SendDirect(*pnPacket)) {
3142  Close("failed to send packet");
3143  return false;
3144  }
3145  return true;
3146 }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
friend class Packet
Definition: C4NetIO.h:687
bool AddPacket(Packet *pPacket)
Definition: C4NetIO.cpp:3032
void Close(const char *szReason)
Definition: C4NetIO.cpp:3396
enum C4NetIOUDP::Peer::ConnStatus eStatus
unsigned int iOPacketCounter
Definition: C4NetIO.h:758
CStdCSec OutCSec
Definition: C4NetIO.h:765
bool SendDirect(const Packet &rPacket, unsigned int iNr=~0)
Definition: C4NetIO.cpp:3468
PacketList OPackets
Definition: C4NetIO.h:754
C4NetIOPacket Duplicate() const
Definition: C4NetIO.h:324

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4NetIOUDP::Peer::SendDirect ( const Packet rPacket,
unsigned int  iNr = ~0 
)
protected

Definition at line 3468 of file C4NetIO.cpp.

References C4NetIOUDP::Packet::FragmentCnt(), C4NetIOUDP::Packet::GetFragment(), C4NetIOUDP::Packet::GetNr(), and C4NetIOUDP::SendDirect().

Referenced by Close().

3469 {
3470  // send one fragment only?
3471  if (iNr + 1)
3472  return SendDirect(rPacket.GetFragment(iNr - rPacket.GetNr()));
3473  // otherwise: send all fragments
3474  bool fSuccess = true;
3475  for (unsigned int i = 0; i < rPacket.FragmentCnt(); i++)
3476  fSuccess &= SendDirect(rPacket.GetFragment(i));
3477  return fSuccess;
3478 }
bool SendDirect(const Packet &rPacket, unsigned int iNr=~0)
Definition: C4NetIO.cpp:3468

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4NetIOUDP::Peer::SendDirect ( C4NetIOPacket &&  rPacket)
protected

Definition at line 3480 of file C4NetIO.cpp.

References C4NetIOUDP::iUDPHeaderSize, and C4NetIOUDP::StatCSec.

3481 {
3482  // insert correct addr
3483  C4NetIO::addr_t v6Addr(addr.AsIPv6());
3484  if (!(rPacket.getStatus() & 0x80)) rPacket.SetAddr(v6Addr);
3485  // count outgoing
3486  { CStdLock StatLock(&StatCSec); iORate += rPacket.getSize() + iUDPHeaderSize; }
3487  // forward call
3488  return pParent->SendDirect(std::move(rPacket));
3489 }
C4NetIO::addr_t addr
Definition: C4NetIO.h:735
static const unsigned int iUDPHeaderSize
Definition: C4NetIO.h:641
size_t getSize() const
Definition: StdBuf.h:101
C4NetIOUDP *const pParent
Definition: C4NetIO.h:732
uint8_t getStatus() const
Definition: C4NetIO.h:317
CStdCSec StatCSec
Definition: C4NetIO.h:777
EndpointAddress AsIPv6() const
Definition: C4NetIO.cpp:336
bool SendDirect(C4NetIOPacket &&rPacket)
Definition: C4NetIO.cpp:3610
void SetAddr(const C4NetIO::addr_t &naddr)
Definition: C4NetIO.h:326
void C4NetIOUDP::Peer::SetAltAddr ( const C4NetIO::addr_t naddr2)
inline

Definition at line 817 of file C4NetIO.h.

817 { addr2 = naddr2; }
C4NetIO::addr_t addr2
Definition: C4NetIO.h:737
void C4NetIOUDP::Peer::SetBroadcast ( bool  fSet)
inline

Definition at line 814 of file C4NetIO.h.

Referenced by C4NetIOUDP::SetBroadcast().

814 { fDoBroadcast = fSet; }
bool fDoBroadcast
Definition: C4NetIO.h:749

Here is the caller graph for this function:

void C4NetIOUDP::Peer::SetTimeout ( int  iLength = iStdTimeout,
int  iRetryCnt = 0 
)
protected

Definition at line 3561 of file C4NetIO.cpp.

References C4TimeMilliseconds::Now(), C4TimeMilliseconds::PositiveInfinity, and C4NetIO::TO_INF.

3562 {
3563  if (iLength != TO_INF)
3564  {
3565  tTimeout = C4TimeMilliseconds::Now() + iLength;
3566  }
3567  else
3568  {
3570  }
3571  iRetries = iRetryCnt;
3572 }
unsigned int iRetries
Definition: C4NetIO.h:773
C4TimeMilliseconds tTimeout
Definition: C4NetIO.h:772
static const int TO_INF
Definition: C4NetIO.h:66
static C4TimeMilliseconds Now()

Here is the call graph for this function:

Member Data Documentation

C4NetIO::addr_t C4NetIOUDP::Peer::addr
protected

Definition at line 735 of file C4NetIO.h.

Referenced by Close(), and GetAddr().

C4NetIO::addr_t C4NetIOUDP::Peer::addr2
protected

Definition at line 737 of file C4NetIO.h.

Referenced by GetAltAddr().

enum C4NetIOUDP::Peer::ConnStatus C4NetIOUDP::Peer::eStatus
protected

Referenced by Close(), Closed(), and Open().

bool C4NetIOUDP::Peer::fConnFailCallback
protected

Definition at line 751 of file C4NetIO.h.

bool C4NetIOUDP::Peer::fDoBroadcast
protected

Definition at line 749 of file C4NetIO.h.

Referenced by doBroadcast().

bool C4NetIOUDP::Peer::fMultiCast
protected

Definition at line 747 of file C4NetIO.h.

Referenced by MultiCast().

const unsigned int C4NetIOUDP::Peer::iConnectRetries = 5
staticprotected

Definition at line 728 of file C4NetIO.h.

unsigned int C4NetIOUDP::Peer::iIMCPacketCounter
protected

Definition at line 760 of file C4NetIO.h.

unsigned int C4NetIOUDP::Peer::iIPacketCounter
protected

Definition at line 759 of file C4NetIO.h.

int C4NetIOUDP::Peer::iIRate
protected

Definition at line 776 of file C4NetIO.h.

Referenced by GetIRate().

unsigned int C4NetIOUDP::Peer::iLastMCPacketAsked
protected

Definition at line 769 of file C4NetIO.h.

unsigned int C4NetIOUDP::Peer::iLastPacketAsked
protected

Definition at line 769 of file C4NetIO.h.

int C4NetIOUDP::Peer::iLoss
protected

Definition at line 776 of file C4NetIO.h.

Referenced by GetLoss().

unsigned int C4NetIOUDP::Peer::iMCAckPacketCounter
protected

Definition at line 762 of file C4NetIO.h.

Referenced by GetMCAckPacketCounter().

PacketList C4NetIOUDP::Peer::IMCPackets
protected

Definition at line 755 of file C4NetIO.h.

unsigned int C4NetIOUDP::Peer::iOPacketCounter
protected

Definition at line 758 of file C4NetIO.h.

int C4NetIOUDP::Peer::iORate
protected

Definition at line 776 of file C4NetIO.h.

Referenced by GetORate().

PacketList C4NetIOUDP::Peer::IPackets
protected

Definition at line 755 of file C4NetIO.h.

const unsigned int C4NetIOUDP::Peer::iReCheckInterval = 1000
staticprotected

Definition at line 729 of file C4NetIO.h.

unsigned int C4NetIOUDP::Peer::iRetries
protected

Definition at line 773 of file C4NetIO.h.

unsigned int C4NetIOUDP::Peer::iRIMCPacketCounter
protected

Definition at line 760 of file C4NetIO.h.

unsigned int C4NetIOUDP::Peer::iRIPacketCounter
protected

Definition at line 759 of file C4NetIO.h.

PacketList C4NetIOUDP::Peer::OPackets
protected

Definition at line 754 of file C4NetIO.h.

CStdCSec C4NetIOUDP::Peer::OutCSec
protected

Definition at line 765 of file C4NetIO.h.

addr_t C4NetIOUDP::Peer::PeerAddr
protected

Definition at line 739 of file C4NetIO.h.

C4NetIOUDP* const C4NetIOUDP::Peer::pParent
protected

Definition at line 732 of file C4NetIO.h.

CStdCSec C4NetIOUDP::Peer::StatCSec
protected

Definition at line 777 of file C4NetIO.h.

C4TimeMilliseconds C4NetIOUDP::Peer::tNextReCheck
protected

Definition at line 768 of file C4NetIO.h.

C4TimeMilliseconds C4NetIOUDP::Peer::tTimeout
protected

Definition at line 772 of file C4NetIO.h.

Referenced by GetTimeout().


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