C# 클래스 Universe.ClientStack.LLUDPClient

Tracks state for a client UDP connection and provides client-specific methods
파일 보기 프로젝트 열기: Virtual-Universe/Virtual-Universe 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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() 공개 메소드

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
리턴 bool

EnqueueOutgoing() 공개 메소드

public EnqueueOutgoing ( OutgoingPacket packet ) : bool
packet OutgoingPacket
리턴 bool

GetCurTaskPacksInQueue() 공개 메소드

public GetCurTaskPacksInQueue ( ) : int
리턴 int

GetCurTexPacksInQueue() 공개 메소드

public GetCurTexPacksInQueue ( ) : int
리턴 int

GetThrottlesPacked() 공개 메소드

public GetThrottlesPacked ( float multiplier ) : byte[]
multiplier float
리턴 byte[]

LLUDPClient() 공개 메소드

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
리턴 System

SendPacketStats() 공개 메소드

public SendPacketStats ( ) : void
리턴 void

SetThrottles() 공개 메소드

public SetThrottles ( byte throttleData ) : void
throttleData byte
리턴 void

Shutdown() 공개 메소드

Shuts down this client connection
public Shutdown ( ) : void
리턴 void

SlowDownSend() 공개 메소드

public SlowDownSend ( ) : 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

MapCatsToPriority 공개적으로 프로퍼티

public int[] MapCatsToPriority
리턴 int[]

NeedAcks 공개적으로 프로퍼티

Packets we have sent that need to be ACKed by the client
public UnackedPacketCollection,Universe.ClientStack NeedAcks
리턴 UnackedPacketCollection

PacketArchive 공개적으로 프로퍼티

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

PacketsReceived 공개적으로 프로퍼티

Number of packets received from this client
public int PacketsReceived
리턴 int

PacketsResent 공개적으로 프로퍼티

Total byte count of unacked packets sent to this client
public int PacketsResent
리턴 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 ConcurrentQueue PendingAcks
리턴 ConcurrentQueue

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