#include <internal.h>
Collaboration diagram for con::Channel:Public Member Functions | |
| u16 | readNextIncomingSeqNum () |
| u16 | incNextIncomingSeqNum () |
| u16 | getOutgoingSequenceNumber (bool &successful) |
| u16 | readOutgoingSequenceNumber () |
| bool | putBackSequenceNumber (u16) |
| u16 | readNextSplitSeqNum () |
| void | setNextSplitSeqNum (u16 seqnum) |
| Channel ()=default | |
| ~Channel ()=default | |
| void | UpdatePacketLossCounter (unsigned int count) |
| void | UpdatePacketTooLateCounter () |
| void | UpdateBytesSent (unsigned int bytes, unsigned int packages=1) |
| void | UpdateBytesLost (unsigned int bytes) |
| void | UpdateBytesReceived (unsigned int bytes) |
| void | UpdateTimers (float dtime) |
| float | getCurrentDownloadRateKB () |
| float | getMaxDownloadRateKB () |
| float | getCurrentLossRateKB () |
| float | getMaxLossRateKB () |
| float | getCurrentIncomingRateKB () |
| float | getMaxIncomingRateKB () |
| float | getAvgDownloadRateKB () |
| float | getAvgLossRateKB () |
| float | getAvgIncomingRateKB () |
| u16 | getWindowSize () const |
| void | setWindowSize (long size) |
Public Attributes | |
| ReliablePacketBuffer | incoming_reliables |
| ReliablePacketBuffer | outgoing_reliables_sent |
| std::queue< BufferedPacketPtr > | queued_reliables |
| std::deque< ConnectionCommandPtr > | queued_commands |
| IncomingSplitBuffer | incoming_splits |
Private Attributes | |
| std::mutex | m_internal_mutex |
| u16 | m_window_size = MIN_RELIABLE_WINDOW_SIZE |
| u16 | next_incoming_seqnum = SEQNUM_INITIAL |
| u16 | next_outgoing_seqnum = SEQNUM_INITIAL |
| u16 | next_outgoing_split_seqnum = SEQNUM_INITIAL |
| unsigned int | current_packet_loss = 0 |
| unsigned int | current_packet_too_late = 0 |
| unsigned int | current_packet_successful = 0 |
| float | packet_loss_counter = 0.0f |
| unsigned int | current_bytes_transfered = 0 |
| unsigned int | current_bytes_received = 0 |
| unsigned int | current_bytes_lost = 0 |
| float | max_kbps = 0.0f |
| float | cur_kbps = 0.0f |
| float | avg_kbps = 0.0f |
| float | max_incoming_kbps = 0.0f |
| float | cur_incoming_kbps = 0.0f |
| float | avg_incoming_kbps = 0.0f |
| float | max_kbps_lost = 0.0f |
| float | cur_kbps_lost = 0.0f |
| float | avg_kbps_lost = 0.0f |
| float | bpm_counter = 0.0f |
| unsigned int | rate_samples = 0 |
|
default |
|
default |
|
inline |
References avg_kbps, and m_internal_mutex.
|
inline |
References avg_incoming_kbps, and m_internal_mutex.
|
inline |
References avg_kbps_lost, and m_internal_mutex.
|
inline |
References cur_kbps, and m_internal_mutex.
|
inline |
References cur_incoming_kbps, and m_internal_mutex.
|
inline |
References cur_kbps_lost, and m_internal_mutex.
|
inline |
References m_internal_mutex, and max_kbps.
|
inline |
References m_internal_mutex, and max_incoming_kbps.
|
inline |
References m_internal_mutex, and max_kbps_lost.
| u16 con::Channel::getOutgoingSequenceNumber | ( | bool & | successful | ) |
References con::ReliablePacketBuffer::empty(), con::ReliablePacketBuffer::getFirstSeqnum(), m_internal_mutex, m_window_size, next_outgoing_seqnum, outgoing_reliables_sent, and SEQNUM_MAX.
Referenced by con::UDPPeer::processReliableSendCommand(), and con::ConnectionSendThread::rawSendAsPacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_window_size.
Referenced by con::UDPPeer::PutReliableSendCommand(), con::ConnectionSendThread::rawSendAsPacket(), and con::ConnectionSendThread::sendPackets().
Here is the caller graph for this function:| u16 con::Channel::incNextIncomingSeqNum | ( | ) |
References m_internal_mutex, and next_incoming_seqnum.
Referenced by con::ConnectionReceiveThread::checkIncomingBuffers(), and con::ConnectionReceiveThread::handlePacketType_Reliable().
Here is the caller graph for this function:| bool con::Channel::putBackSequenceNumber | ( | u16 | seqnum | ) |
References next_outgoing_seqnum, and SEQNUM_MAX.
Referenced by con::UDPPeer::processReliableSendCommand().
Here is the caller graph for this function:| u16 con::Channel::readNextIncomingSeqNum | ( | ) |
References m_internal_mutex, and next_incoming_seqnum.
Referenced by con::ConnectionReceiveThread::checkIncomingBuffers(), con::ConnectionReceiveThread::handlePacketType_Reliable(), and con::ConnectionSendThread::sendPackets().
Here is the caller graph for this function:| u16 con::Channel::readNextSplitSeqNum | ( | ) |
References m_internal_mutex, and next_outgoing_split_seqnum.
Referenced by con::UDPPeer::getNextSplitSequenceNumber(), and con::UDPPeer::processReliableSendCommand().
Here is the caller graph for this function:| u16 con::Channel::readOutgoingSequenceNumber | ( | ) |
References m_internal_mutex, and next_outgoing_seqnum.
Referenced by con::ConnectionSendThread::sendAsPacketReliable().
Here is the caller graph for this function:| void con::Channel::setNextSplitSeqNum | ( | u16 | seqnum | ) |
References m_internal_mutex, and next_outgoing_split_seqnum.
Referenced by con::UDPPeer::processReliableSendCommand(), and con::UDPPeer::setNextSplitSequenceNumber().
Here is the caller graph for this function:
|
inline |
References m_window_size, MAX_RELIABLE_WINDOW_SIZE_SEND, MIN_RELIABLE_WINDOW_SIZE, and rangelim.
Referenced by UpdateTimers().
Here is the caller graph for this function:| void con::Channel::UpdateBytesLost | ( | unsigned int | bytes | ) |
References current_bytes_lost, and m_internal_mutex.
Referenced by con::ConnectionSendThread::resendReliable().
Here is the caller graph for this function:| void con::Channel::UpdateBytesReceived | ( | unsigned int | bytes | ) |
References current_bytes_received, and m_internal_mutex.
Referenced by con::ConnectionReceiveThread::receive().
Here is the caller graph for this function:| void con::Channel::UpdateBytesSent | ( | unsigned int | bytes, |
| unsigned int | packages = 1 ) |
References current_bytes_transfered, current_packet_successful, and m_internal_mutex.
Referenced by con::ConnectionReceiveThread::handlePacketType_Control().
Here is the caller graph for this function:| void con::Channel::UpdatePacketLossCounter | ( | unsigned int | count | ) |
References current_packet_loss, and m_internal_mutex.
| void con::Channel::UpdatePacketTooLateCounter | ( | ) |
References current_packet_too_late, and m_internal_mutex.
Referenced by con::ConnectionReceiveThread::handlePacketType_Control().
Here is the caller graph for this function:| void con::Channel::UpdateTimers | ( | float | dtime | ) |
References avg_incoming_kbps, avg_kbps, avg_kbps_lost, bpm_counter, cur_incoming_kbps, cur_kbps, cur_kbps_lost, current_bytes_lost, current_bytes_received, current_bytes_transfered, current_packet_loss, current_packet_successful, current_packet_too_late, m_internal_mutex, m_window_size, max_incoming_kbps, max_kbps, max_kbps_lost, MYMIN, packet_loss_counter, rate_samples, and setWindowSize().
Here is the call graph for this function:
|
private |
Referenced by getAvgIncomingRateKB(), and UpdateTimers().
|
private |
Referenced by getAvgDownloadRateKB(), and UpdateTimers().
|
private |
Referenced by getAvgLossRateKB(), and UpdateTimers().
|
private |
Referenced by UpdateTimers().
|
private |
Referenced by getCurrentIncomingRateKB(), and UpdateTimers().
|
private |
Referenced by getCurrentDownloadRateKB(), and UpdateTimers().
|
private |
Referenced by getCurrentLossRateKB(), and UpdateTimers().
|
private |
Referenced by UpdateBytesLost(), and UpdateTimers().
|
private |
Referenced by UpdateBytesReceived(), and UpdateTimers().
|
private |
Referenced by UpdateBytesSent(), and UpdateTimers().
|
private |
Referenced by UpdatePacketLossCounter(), and UpdateTimers().
|
private |
Referenced by UpdateBytesSent(), and UpdateTimers().
|
private |
Referenced by UpdatePacketTooLateCounter(), and UpdateTimers().
| ReliablePacketBuffer con::Channel::incoming_reliables |
| IncomingSplitBuffer con::Channel::incoming_splits |
Referenced by con::UDPPeer::addSplitPacket(), and con::ConnectionSendThread::runTimeouts().
|
private |
Referenced by getAvgDownloadRateKB(), getAvgIncomingRateKB(), getAvgLossRateKB(), getCurrentDownloadRateKB(), getCurrentIncomingRateKB(), getCurrentLossRateKB(), getMaxDownloadRateKB(), getMaxIncomingRateKB(), getMaxLossRateKB(), getOutgoingSequenceNumber(), incNextIncomingSeqNum(), readNextIncomingSeqNum(), readNextSplitSeqNum(), readOutgoingSequenceNumber(), setNextSplitSeqNum(), UpdateBytesLost(), UpdateBytesReceived(), UpdateBytesSent(), UpdatePacketLossCounter(), UpdatePacketTooLateCounter(), and UpdateTimers().
|
private |
Referenced by getOutgoingSequenceNumber(), getWindowSize(), setWindowSize(), and UpdateTimers().
|
private |
Referenced by getMaxIncomingRateKB(), and UpdateTimers().
|
private |
Referenced by getMaxDownloadRateKB(), and UpdateTimers().
|
private |
Referenced by getMaxLossRateKB(), and UpdateTimers().
|
private |
Referenced by incNextIncomingSeqNum(), and readNextIncomingSeqNum().
|
private |
Referenced by getOutgoingSequenceNumber(), putBackSequenceNumber(), and readOutgoingSequenceNumber().
|
private |
Referenced by readNextSplitSeqNum(), and setNextSplitSeqNum().
| ReliablePacketBuffer con::Channel::outgoing_reliables_sent |
Referenced by getOutgoingSequenceNumber(), con::ConnectionReceiveThread::handlePacketType_Control(), con::UDPPeer::isTimedOut(), con::ConnectionSendThread::processReliableCommand(), con::UDPPeer::processReliableSendCommand(), con::ConnectionSendThread::rawSendAsPacket(), con::ConnectionSendThread::sendAsPacketReliable(), and con::ConnectionSendThread::sendPackets().
|
private |
Referenced by UpdateTimers().
| std::deque<ConnectionCommandPtr> con::Channel::queued_commands |
Referenced by con::UDPPeer::PutReliableSendCommand(), and con::ConnectionSendThread::sendPackets().
| std::queue<BufferedPacketPtr> con::Channel::queued_reliables |
|
private |
Referenced by UpdateTimers().