#include <connection.h>
Public Member Functions | |
ReliablePacketBuffer ()=default | |
bool | getFirstSeqnum (u16 &result) |
BufferedPacket | popFirst () |
BufferedPacket | popSeqnum (u16 seqnum) |
void | insert (BufferedPacket &p, u16 next_expected) |
void | incrementTimeouts (float dtime) |
std::list< BufferedPacket > | getTimedOuts (float timeout, unsigned int max_packets) |
void | print () |
bool | empty () |
RPBSearchResult | notFound () |
u32 | size () |
Private Member Functions | |
RPBSearchResult | findPacket (u16 seqnum) |
Private Attributes | |
std::list< BufferedPacket > | m_list |
u16 | m_oldest_non_answered_ack |
std::mutex | m_list_mutex |
|
default |
bool con::ReliablePacketBuffer::empty | ( | ) |
References m_list, and m_list_mutex.
Referenced by con::Channel::getOutgoingSequenceNumber().
|
private |
References BASE_HEADER_SIZE, m_list, and readU16().
Referenced by popSeqnum().
bool con::ReliablePacketBuffer::getFirstSeqnum | ( | u16 & | result | ) |
References BASE_HEADER_SIZE, m_list, m_list_mutex, p(), and readU16().
Referenced by con::ConnectionReceiveThread::checkIncomingBuffers(), con::Channel::getOutgoingSequenceNumber(), con::ConnectionReceiveThread::handlePacketType_Reliable(), and con::ConnectionSendThread::sendPackets().
std::list< BufferedPacket > con::ReliablePacketBuffer::getTimedOuts | ( | float | timeout, |
unsigned int | max_packets | ||
) |
References m_list, and m_list_mutex.
Referenced by con::ConnectionSendThread::runTimeouts().
void con::ReliablePacketBuffer::incrementTimeouts | ( | float | dtime | ) |
References m_list, and m_list_mutex.
Referenced by con::ConnectionSendThread::runTimeouts().
void con::ReliablePacketBuffer::insert | ( | BufferedPacket & | p, |
u16 | next_expected | ||
) |
References BASE_HEADER_SIZE, errorstream, m_list, m_list_mutex, m_oldest_non_answered_ack, MAX_RELIABLE_WINDOW_SIZE, p(), con::PACKET_TYPE_RELIABLE, readU16(), readU8(), sanity_check, con::seqnum_in_window(), and SEQNUM_MAX.
Referenced by con::ConnectionReceiveThread::handlePacketType_Reliable(), and con::ConnectionSendThread::sendAsPacketReliable().
RPBSearchResult con::ReliablePacketBuffer::notFound | ( | ) |
BufferedPacket con::ReliablePacketBuffer::popFirst | ( | ) |
References BASE_HEADER_SIZE, m_list, m_list_mutex, m_oldest_non_answered_ack, p(), and readU16().
Referenced by con::ConnectionReceiveThread::checkIncomingBuffers(), and con::ConnectionReceiveThread::handlePacketType_Reliable().
BufferedPacket con::ReliablePacketBuffer::popSeqnum | ( | u16 | seqnum | ) |
References BASE_HEADER_SIZE, dout_con, findPacket(), LOG, m_list, m_list_mutex, m_oldest_non_answered_ack, notFound(), p(), and readU16().
Referenced by con::ConnectionReceiveThread::handlePacketType_Control().
void con::ReliablePacketBuffer::print | ( | ) |
References BASE_HEADER_SIZE, dout_con, LOG, m_list, m_list_mutex, and readU16().
u32 con::ReliablePacketBuffer::size | ( | ) |
References m_list, and m_list_mutex.
Referenced by con::ConnectionReceiveThread::handlePacketType_Control(), con::UDPPeer::processReliableSendCommand(), con::ConnectionSendThread::rawSendAsPacket(), and con::ConnectionSendThread::sendPackets().
|
private |
Referenced by empty(), findPacket(), getFirstSeqnum(), getTimedOuts(), incrementTimeouts(), insert(), notFound(), popFirst(), popSeqnum(), print(), and size().
|
private |
Referenced by empty(), getFirstSeqnum(), getTimedOuts(), incrementTimeouts(), insert(), popFirst(), popSeqnum(), print(), and size().
|
private |
Referenced by insert(), popFirst(), and popSeqnum().