OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | List of all members
OpenSim.Region.ClientStack.LindenUDP.UnackedPacketCollection Class Reference

Special collection that is optimized for tracking unacknowledged packets More...

Public Member Functions

void Add (OutgoingPacket packet)
 Add an unacked packet to the collection More...
 
void Acknowledge (uint sequenceNumber, int currentTime, bool fromResend)
 Marks a packet as acknowledged This method is used when an acknowledgement is received from the network for a previously sent packet. Effects of removal this way are to update unacked byte count, adjust RTT and increase throttle to the coresponding client. More...
 
void Remove (uint sequenceNumber)
 Marks a packet as no longer needing acknowledgement without a received acknowledgement. This method is called when a packet expires and we no longer need an acknowledgement. When some reliable packet types expire, they are handled in a way other than simply resending them. The only effect of removal this way is to update unacked byte count. More...
 
List< OutgoingPacketGetExpiredPackets (int timeoutMS)
 Returns a list of all of the packets with a TickCount older than the specified timeout More...
 

Detailed Description

Special collection that is optimized for tracking unacknowledged packets

Definition at line 42 of file UnackedPacketCollection.cs.

Member Function Documentation

void OpenSim.Region.ClientStack.LindenUDP.UnackedPacketCollection.Acknowledge ( uint  sequenceNumber,
int  currentTime,
bool  fromResend 
)
inline

Marks a packet as acknowledged This method is used when an acknowledgement is received from the network for a previously sent packet. Effects of removal this way are to update unacked byte count, adjust RTT and increase throttle to the coresponding client.

Parameters
sequenceNumberSequence number of the packet to acknowledge
currentTimeCurrent value of Environment.TickCount

This does not immediately acknowledge the packet, it only queues the ack so it can be handled in a thread-safe way later

Definition at line 102 of file UnackedPacketCollection.cs.

Here is the caller graph for this function:

void OpenSim.Region.ClientStack.LindenUDP.UnackedPacketCollection.Add ( OutgoingPacket  packet)
inline

Add an unacked packet to the collection

Parameters
packetPacket that is awaiting acknowledgement
Returns
True if the packet was successfully added, false if the packet already existed in the collection

This does not immediately add the ACK to the collection, it only queues it so it can be added in a thread-safe way later

Definition at line 85 of file UnackedPacketCollection.cs.

List<OutgoingPacket> OpenSim.Region.ClientStack.LindenUDP.UnackedPacketCollection.GetExpiredPackets ( int  timeoutMS)
inline

Returns a list of all of the packets with a TickCount older than the specified timeout

This function is not thread safe, and cannot be called multiple times concurrently

Parameters
timeoutMSNumber of ticks (milliseconds) before a packet is considered expired
Returns
A list of all expired packets according to the given expiration timeout

Definition at line 137 of file UnackedPacketCollection.cs.

void OpenSim.Region.ClientStack.LindenUDP.UnackedPacketCollection.Remove ( uint  sequenceNumber)
inline

Marks a packet as no longer needing acknowledgement without a received acknowledgement. This method is called when a packet expires and we no longer need an acknowledgement. When some reliable packet types expire, they are handled in a way other than simply resending them. The only effect of removal this way is to update unacked byte count.

Parameters
sequenceNumberSequence number of the packet to acknowledge

The does not immediately remove the packet, it only queues the removal so it can be handled in a thread safe way later

Definition at line 117 of file UnackedPacketCollection.cs.


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