C# 클래스 Squishy.Network.Throttle

A Throttle limits the download and/or upload speed of all its Connections to given values. The Throttle will adjust the buffersize of the Connection'str read- and write-buffer, according to the given speed limits. When throttling is discontinued the Throttle will reset the buffersizes to its default values: Connection.DefaultReceiveBufferSize and Connection.DefaultReceiveSendSize
파일 보기 프로젝트 열기: jaddie/WCell-Utility-Bot 1 사용 예제들

공개 메소드들

메소드 설명
Add ( Connection con ) : void

Adds a new connection to this throttle.

Remove ( Connection con ) : void

Removes an existent Connection from this throttle or does nothing if the connection does not belong to this throttle.

Remove ( int index ) : void
RemoveAll ( ) : void

Removes all connections from this throttle.

Throttle ( ThrottleType type ) : System
this ( int index ) : Connection

비공개 메소드들

메소드 설명
AdjustReceiveBuffer ( ) : void
AdjustSendBuffer ( ) : void
CalculateBufferSize ( int maxSpeed ) : int
Poll ( ) : void
ResetReceiveBuffer ( ) : void
ResetReceiveBuffer ( Connection con ) : void
ResetSendBuffer ( ) : void
ResetSendBuffer ( Connection con ) : void
UpdateDownload ( int newBytes ) : void
UpdateUpload ( int newBytes ) : void

메소드 상세

Add() 공개 메소드

Adds a new connection to this throttle.
public Add ( Connection con ) : void
con Connection
리턴 void

Remove() 공개 메소드

Removes an existent Connection from this throttle or does nothing if the connection does not belong to this throttle.
public Remove ( Connection con ) : void
con Connection
리턴 void

Remove() 공개 메소드

public Remove ( int index ) : void
index int
리턴 void

RemoveAll() 공개 메소드

Removes all connections from this throttle.
public RemoveAll ( ) : void
리턴 void

Throttle() 공개 메소드

public Throttle ( ThrottleType type ) : System
type ThrottleType
리턴 System

this() 공개 메소드

public this ( int index ) : Connection
index int
리턴 Connection