C# Class Universe.ClientStack.LLUDPClient

Tracks state for a client UDP connection and provides client-specific methods
Afficher le fichier Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Méthodes publiques

Свойство Type Description
AgentID UUID
BytesSinceLastACK int
CircuitCode uint
CurrentPingSequence byte
CurrentSequence int
IsConnected bool
IsPaused bool
MapCatsToPriority int[]
NeedAcks UnackedPacketCollection
PacketArchive IncomingPacketHistoryCollection
PacketsReceived int
PacketsResent int
PacketsSent int
PendingAcks ConcurrentQueue
RTO int
RTTVAR float
RemoteEndPoint System.Net.IPEndPoint
SRTT float
TickLastPacketReceived int
UnackedBytes int

Méthodes publiques

Méthode Description
BackoffRTO ( ) : void

Exponential backoff of the retransmission timeout, per section 5.5 of RFC 2988

DequeueOutgoing ( int MaxNPacks ) : bool

tries to send queued packets

This function is only called from a synchronous loop in the UDPServer so we don't need to bother making this thread safe

EnqueueOutgoing ( OutgoingPacket packet ) : bool
GetCurTaskPacksInQueue ( ) : int
GetCurTexPacksInQueue ( ) : int
GetThrottlesPacked ( float multiplier ) : byte[]
LLUDPClient ( LLUDPServer server, ThrottleRates rates, TokenBucket parentThrottle, uint circuitCode, UUID agentID, IPEndPoint remoteEndPoint, int defaultRTO, int maxRTO ) : System

Default constructor

SendPacketStats ( ) : void
SetThrottles ( byte throttleData ) : void
Shutdown ( ) : void

Shuts down this client connection

SlowDownSend ( ) : void
UpdateRoundTrip ( float r ) : void

Called when an ACK packet is received and a round-trip time for a packet is calculated. This is used to calculate the smoothed round-trip time, round trip time variance, and finally the retransmission timeout

Private Methods

Méthode Description
FireQueueEmpty ( object o ) : void

Fires the OnQueueEmpty callback and sets the minimum time that it can be called again

Method Details

BackoffRTO() public méthode

Exponential backoff of the retransmission timeout, per section 5.5 of RFC 2988
public BackoffRTO ( ) : void
Résultat void

DequeueOutgoing() public méthode

tries to send queued packets
This function is only called from a synchronous loop in the UDPServer so we don't need to bother making this thread safe
public DequeueOutgoing ( int MaxNPacks ) : bool
MaxNPacks int
Résultat bool

EnqueueOutgoing() public méthode

public EnqueueOutgoing ( OutgoingPacket packet ) : bool
packet OutgoingPacket
Résultat bool

GetCurTaskPacksInQueue() public méthode

public GetCurTaskPacksInQueue ( ) : int
Résultat int

GetCurTexPacksInQueue() public méthode

public GetCurTexPacksInQueue ( ) : int
Résultat int

GetThrottlesPacked() public méthode

public GetThrottlesPacked ( float multiplier ) : byte[]
multiplier float
Résultat byte[]

LLUDPClient() public méthode

Default constructor
public LLUDPClient ( LLUDPServer server, ThrottleRates rates, TokenBucket parentThrottle, uint circuitCode, UUID agentID, IPEndPoint remoteEndPoint, int defaultRTO, int maxRTO ) : System
server LLUDPServer Reference to the UDP server this client is connected to
rates ThrottleRates Default throttling rates and maximum throttle limits
parentThrottle TokenBucket /// Parent HTB (hierarchical token bucket) /// that the child throttles will be governed by ///
circuitCode uint Circuit code for this connection
agentID UUID AgentID for the connected agent
remoteEndPoint System.Net.IPEndPoint Remote endpoint for this connection
defaultRTO int
maxRTO int
Résultat System

SendPacketStats() public méthode

public SendPacketStats ( ) : void
Résultat void

SetThrottles() public méthode

public SetThrottles ( byte throttleData ) : void
throttleData byte
Résultat void

Shutdown() public méthode

Shuts down this client connection
public Shutdown ( ) : void
Résultat void

SlowDownSend() public méthode

public SlowDownSend ( ) : void
Résultat void

UpdateRoundTrip() public méthode

Called when an ACK packet is received and a round-trip time for a packet is calculated. This is used to calculate the smoothed round-trip time, round trip time variance, and finally the retransmission timeout
public UpdateRoundTrip ( float r ) : void
r float /// Round-trip time of a single packet and its /// acknowledgement ///
Résultat void

Property Details

AgentID public_oe property

AgentID for this client
public UUID AgentID
Résultat UUID

BytesSinceLastACK public_oe property

Number of bytes received since the last acknowledgement was sent out. This is used to loosely follow the TCP delayed ACK algorithm in RFC 1122 (4.2.3.2)
public int BytesSinceLastACK
Résultat int

CircuitCode public_oe property

Circuit code that this client is connected on
public uint CircuitCode
Résultat uint

CurrentPingSequence public_oe property

Current ping sequence number
public byte CurrentPingSequence
Résultat byte

CurrentSequence public_oe property

Current packet sequence number
public int CurrentSequence
Résultat int

IsConnected public_oe property

True when this connection is alive, otherwise false
public bool IsConnected
Résultat bool

IsPaused public_oe property

True when this connection is paused, otherwise false
public bool IsPaused
Résultat bool

MapCatsToPriority public_oe property

public int[] MapCatsToPriority
Résultat int[]

NeedAcks public_oe property

Packets we have sent that need to be ACKed by the client
public UnackedPacketCollection,Universe.ClientStack NeedAcks
Résultat UnackedPacketCollection

PacketArchive public_oe property

Sequence numbers of packets we've received (for duplicate checking)
public IncomingPacketHistoryCollection,Universe.ClientStack PacketArchive
Résultat IncomingPacketHistoryCollection

PacketsReceived public_oe property

Number of packets received from this client
public int PacketsReceived
Résultat int

PacketsResent public_oe property

Total byte count of unacked packets sent to this client
public int PacketsResent
Résultat int

PacketsSent public_oe property

Number of packets sent to this client
public int PacketsSent
Résultat int

PendingAcks public_oe property

ACKs that are queued up, waiting to be sent to the client
public ConcurrentQueue PendingAcks
Résultat ConcurrentQueue

RTO public_oe property

Retransmission timeout. Packets that have not been acknowledged in this number of milliseconds or longer will be resent
Calculated from SRTT and RTTVAR using the guidelines in RFC 2988
public int RTO
Résultat int

RTTVAR public_oe property

Round-trip time variance. Measures the consistency of round-trip times
public float RTTVAR
Résultat float

RemoteEndPoint public_oe property

The remote address of the connected client
public IPEndPoint,System.Net RemoteEndPoint
Résultat System.Net.IPEndPoint

SRTT public_oe property

Smoothed round-trip time. A smoothed average of the round-trip time for sending a reliable packet to the client and receiving an ACK
public float SRTT
Résultat float

TickLastPacketReceived public_oe property

Environment.TickCount when the last packet was received for this client
public int TickLastPacketReceived
Résultat int

UnackedBytes public_oe property

Total byte count of unacked packets sent to this client
public int UnackedBytes
Résultat int