MCPcopy Create free account
hub / github.com/ddnet/ddnet / Reset

Method Reset

src/engine/shared/network_conn.cpp:30–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void CNetConnection::Reset(bool Rejoin)
31{
32 m_Sequence = 0;
33 m_Ack = 0;
34 m_PeerAck = 0;
35 m_RemoteClosed = 0;
36
37 if(!Rejoin)
38 {
39 m_TimeoutProtected = false;
40 m_TimeoutSituation = false;
41
42 m_State = EState::OFFLINE;
43 m_Token = -1;
44 m_SecurityToken = NET_SECURITY_TOKEN_UNKNOWN;
45 m_Sixup = false;
46 }
47
48 m_LastSendTime = 0;
49 m_LastRecvTime = 0;
50
51 mem_zero(&m_aConnectAddrs, sizeof(m_aConnectAddrs));
52 m_NumConnectAddrs = 0;
53 m_UnknownSeq = false;
54
55 m_Buffer.Init();
56
57 mem_zero(&m_Construct, sizeof(m_Construct));
58}
59
60const char *CNetConnection::ErrorString()
61{

Callers

nothing calls this directly

Calls 2

mem_zeroFunction · 0.85
InitMethod · 0.45

Tested by

no test coverage detected