#include <impl.h>
Classes | |
struct | rttstats |
Public Member Functions | |
virtual | ~Peer () |
void | Drop () |
virtual void | PutReliableSendCommand (ConnectionCommandPtr &c, unsigned int max_packet_size) |
bool | isPendingDeletion () const |
void | ResetTimeout () |
bool | isHalfOpen () const |
void | SetFullyOpen () |
virtual bool | isTimedOut (float timeout, std::string &reason) |
virtual u16 | getNextSplitSequenceNumber (u8 channel) |
virtual void | setNextSplitSequenceNumber (u8 channel, u16 seqnum) |
virtual SharedBuffer< u8 > | addSplitPacket (u8 channel, BufferedPacketPtr &toadd, bool reliable) |
virtual bool | Ping (float dtime, SharedBuffer< u8 > &data) |
virtual float | getStat (rtt_stat_type type) const |
Public Member Functions inherited from con::IPeer | |
virtual const Address & | getAddress () const =0 |
Public Attributes | |
unsigned int | m_increment_packets_remaining = 0 |
Public Attributes inherited from con::IPeer | |
const session_t | id |
Protected Member Functions | |
Peer (session_t id, const Address &address, Connection *connection) | |
virtual void | reportRTT (float rtt) |
void | RTTStatistics (float rtt, const std::string &profiler_id="", unsigned int num_samples=1000) |
bool | IncUseCount () |
void | DecUseCount () |
Protected Member Functions inherited from con::IPeer | |
IPeer (session_t id) | |
~IPeer () | |
Protected Attributes | |
std::mutex | m_exclusive_access_mutex |
bool | m_pending_deletion = false |
Connection * | m_connection |
Address | address |
float | m_ping_timer = 0.0f |
Private Attributes | |
rttstats | m_rtt |
float | m_last_rtt = -1.0f |
bool | m_half_open = true |
unsigned int | m_usage = 0 |
float | m_timeout_counter = 0.0f |
u64 | m_last_timeout_check |
Friends | |
class | PeerHelper |
|
inlinevirtual |
References FATAL_ERROR_IF, m_exclusive_access_mutex, and m_usage.
|
inlineprotected |
|
inlinevirtual |
Reimplemented in con::UDPPeer.
References FATAL_ERROR.
Referenced by con::ConnectionReceiveThread::handlePacketType_Split().
|
protected |
References m_exclusive_access_mutex, m_pending_deletion, m_usage, and sanity_check.
Referenced by con::PeerHelper::~PeerHelper(), and con::PeerHelper::operator=().
void con::Peer::Drop | ( | ) |
References g_profiler, con::Connection::getDesc(), m_connection, m_exclusive_access_mutex, m_pending_deletion, m_usage, PROFILE, Profiler::remove(), and SPT_AVG.
Referenced by con::Connection::deletePeer().
|
inlinevirtual |
Reimplemented in con::UDPPeer.
Referenced by con::ConnectionSendThread::send().
|
inlinevirtual |
References con::AVG_JITTER, con::AVG_RTT, con::Peer::rttstats::avg_rtt, con::Peer::rttstats::jitter_avg, con::Peer::rttstats::jitter_max, con::Peer::rttstats::jitter_min, m_rtt, con::MAX_JITTER, con::MAX_RTT, con::Peer::rttstats::max_rtt, con::MIN_JITTER, con::MIN_RTT, and con::Peer::rttstats::min_rtt.
Referenced by con::Connection::getPeerStat(), and con::UDPPeer::reportRTT().
|
protected |
References m_exclusive_access_mutex, m_pending_deletion, and m_usage.
Referenced by con::PeerHelper::operator=().
|
inline |
References m_exclusive_access_mutex, and m_half_open.
Referenced by con::Connection::getActiveCount(), con::UDPPeer::Ping(), con::ConnectionReceiveThread::receive(), and con::ConnectionSendThread::runTimeouts().
|
inline |
References m_exclusive_access_mutex, and m_pending_deletion.
Referenced by con::Connection::getActiveCount(), and con::Connection::lookupPeer().
|
virtual |
Reimplemented in con::UDPPeer.
References con::CALC_DTIME(), porting::getTimeMs(), m_exclusive_access_mutex, m_last_timeout_check, and m_timeout_counter.
Referenced by con::UDPPeer::isTimedOut(), and con::ConnectionSendThread::runTimeouts().
|
inlinevirtual |
Reimplemented in con::UDPPeer.
|
inlinevirtual |
Reimplemented in con::UDPPeer.
Referenced by con::ConnectionSendThread::sendReliable(), and con::ConnectionSendThread::sendToAllReliable().
|
inlineprotectedvirtual |
Reimplemented in con::UDPPeer.
|
inline |
References m_exclusive_access_mutex, and m_timeout_counter.
Referenced by con::ConnectionReceiveThread::receive().
|
protected |
References con::Peer::rttstats::avg_rtt, g_profiler, Profiler::graphAdd(), con::Peer::rttstats::jitter_avg, con::Peer::rttstats::jitter_max, con::Peer::rttstats::jitter_min, m_last_rtt, m_rtt, con::Peer::rttstats::max_rtt, and con::Peer::rttstats::min_rtt.
Referenced by con::UDPPeer::reportRTT().
|
inline |
References m_exclusive_access_mutex, and m_half_open.
Referenced by con::Connection::createServerPeer(), and con::ConnectionReceiveThread::receive().
|
inlinevirtual |
Reimplemented in con::UDPPeer.
Referenced by con::ConnectionSendThread::send().
|
friend |
|
protected |
|
protected |
|
mutableprotected |
|
private |
Referenced by isHalfOpen(), and SetFullyOpen().
unsigned int con::Peer::m_increment_packets_remaining = 0 |
Referenced by con::ConnectionSendThread::sendPackets().
|
private |
Referenced by RTTStatistics().
|
private |
Referenced by isTimedOut().
|
protected |
Referenced by DecUseCount(), Drop(), IncUseCount(), and isPendingDeletion().
|
protected |
Referenced by con::UDPPeer::Ping().
|
private |
Referenced by getStat(), and RTTStatistics().
|
private |
Referenced by isTimedOut(), and ResetTimeout().
|
private |
Referenced by ~Peer(), DecUseCount(), Drop(), and IncUseCount().