C# Класс OpenSim.Region.ClientStack.LindenUDP.LLUDPClient

Tracks state for a client UDP connection and provides client-specific methods
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
AgentID UUID
BytesSinceLastACK int
CircuitCode uint
CurrentPingSequence byte
CurrentSequence int
IsConnected bool
IsPaused bool
NeedAcks UnackedPacketCollection
PacketArchive OpenSim.Region.ClientStack.LindenUDP.IncomingPacketHistoryCollection
PacketsReceived int
PacketsSent int
PendingAcks OpenSim.Framework.LocklessQueue
RTO int
RTTVAR float
RemoteEndPoint System.Net.IPEndPoint
SRTT float
TickLastPacketReceived int
UnackedBytes int

Открытые методы

Метод Описание
BackoffRTO ( ) : void

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

DequeueOutgoing ( ) : bool

Loops through all of the packet queues for this client and tries to send an outgoing packet from each, obeying the throttling bucket limits

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

EnqueueOutgoing ( OpenSim.Region.ClientStack.LindenUDP.OutgoingPacket packet ) : bool
GetClientInfo ( ) : ClientInfo

Gets information about this client connection

GetStats ( ) : string
GetThrottlesPacked ( ) : byte[]
LLUDPClient ( LLUDPServer server, OpenSim.Region.ClientStack.LindenUDP.ThrottleRates rates, OpenSim.Region.ClientStack.LindenUDP.TokenBucket parentThrottle, uint circuitCode, UUID agentID, IPEndPoint remoteEndPoint, int defaultRTO, int maxRTO ) : System

Default constructor

SendPacketStats ( ) : void
SetClientInfo ( ClientInfo info ) : void

Modifies the UDP throttles

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

Shuts down this client connection

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

Приватные методы

Метод Описание
BeginFireQueueEmpty ( ThrottleOutPacketTypeFlags categories ) : void

Does an early check to see if this queue empty callback is already running, then asynchronously firing the event

CategoryToFlag ( int i ) : ThrottleOutPacketTypeFlags

Converts a ThrottleOutPacketType integer to a flag value

FireQueueEmpty ( object o ) : void

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

Описание методов

BackoffRTO() публичный Метод

Exponential backoff of the retransmission timeout, per section 5.5 of RFC 2988
public BackoffRTO ( ) : void
Результат void

DequeueOutgoing() публичный Метод

Loops through all of the packet queues for this client and tries to send an outgoing packet from each, obeying the throttling bucket limits
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 ( ) : bool
Результат bool

EnqueueOutgoing() публичный Метод

public EnqueueOutgoing ( OpenSim.Region.ClientStack.LindenUDP.OutgoingPacket packet ) : bool
packet OpenSim.Region.ClientStack.LindenUDP.OutgoingPacket
Результат bool

GetClientInfo() публичный Метод

Gets information about this client connection
public GetClientInfo ( ) : ClientInfo
Результат OpenSim.Framework.ClientInfo

GetStats() публичный Метод

public GetStats ( ) : string
Результат string

GetThrottlesPacked() публичный Метод

public GetThrottlesPacked ( ) : byte[]
Результат byte[]

LLUDPClient() публичный Метод

Default constructor
public LLUDPClient ( LLUDPServer server, OpenSim.Region.ClientStack.LindenUDP.ThrottleRates rates, OpenSim.Region.ClientStack.LindenUDP.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 OpenSim.Region.ClientStack.LindenUDP.ThrottleRates Default throttling rates and maximum throttle limits
parentThrottle OpenSim.Region.ClientStack.LindenUDP.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
Результат System

SendPacketStats() публичный Метод

public SendPacketStats ( ) : void
Результат void

SetClientInfo() публичный Метод

Modifies the UDP throttles
public SetClientInfo ( ClientInfo info ) : void
info OpenSim.Framework.ClientInfo New throttling values
Результат void

SetThrottles() публичный Метод

public SetThrottles ( byte throttleData ) : void
throttleData byte
Результат void

Shutdown() публичный Метод

Shuts down this client connection
public Shutdown ( ) : void
Результат void

UpdateRoundTrip() публичный Метод

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
Результат void

Описание свойств

AgentID публичное свойство

AgentID for this client
public UUID AgentID
Результат UUID

BytesSinceLastACK публичное свойство

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
Результат int

CircuitCode публичное свойство

Circuit code that this client is connected on
public uint CircuitCode
Результат uint

CurrentPingSequence публичное свойство

Current ping sequence number
public byte CurrentPingSequence
Результат byte

CurrentSequence публичное свойство

Current packet sequence number
public int CurrentSequence
Результат int

IsConnected публичное свойство

True when this connection is alive, otherwise false
public bool IsConnected
Результат bool

IsPaused публичное свойство

True when this connection is paused, otherwise false
public bool IsPaused
Результат bool

NeedAcks публичное свойство

Packets we have sent that need to be ACKed by the client
public UnackedPacketCollection,OpenSim.Region.ClientStack.LindenUDP NeedAcks
Результат UnackedPacketCollection

PacketArchive публичное свойство

Sequence numbers of packets we've received (for duplicate checking)
public IncomingPacketHistoryCollection,OpenSim.Region.ClientStack.LindenUDP PacketArchive
Результат OpenSim.Region.ClientStack.LindenUDP.IncomingPacketHistoryCollection

PacketsReceived публичное свойство

Number of packets received from this client
public int PacketsReceived
Результат int

PacketsSent публичное свойство

Number of packets sent to this client
public int PacketsSent
Результат int

PendingAcks публичное свойство

ACKs that are queued up, waiting to be sent to the client
public LocklessQueue,OpenSim.Framework PendingAcks
Результат OpenSim.Framework.LocklessQueue

RTO публичное свойство

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
Результат int

RTTVAR публичное свойство

Round-trip time variance. Measures the consistency of round-trip times
public float RTTVAR
Результат float

RemoteEndPoint публичное свойство

The remote address of the connected client
public IPEndPoint,System.Net RemoteEndPoint
Результат System.Net.IPEndPoint

SRTT публичное свойство

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
Результат float

TickLastPacketReceived публичное свойство

Environment.TickCount when the last packet was received for this client
public int TickLastPacketReceived
Результат int

UnackedBytes публичное свойство

Total byte count of unacked packets sent to this client
public int UnackedBytes
Результат int