C# 클래스 IrcDotNet.IrcStandardFloodPreventer

Represents a flood protector that throttles data sent by the client according to the standard rules implemented by modern IRC servers.
The principle is that no message may be sent by the client once the value of an internal counter has reached the value of MaxMessageBurst. The counter is incremented every time a message is sent, and decremented by one every duration of CounterPeriod. Hence, messages may be sent immediately in bursts so long as the high rate is not sustained, else a delay is introduced between the sending of successive messages, such that the data.
상속: IIrcFloodPreventer
파일 보기 프로젝트 열기: IrcDotNet/IrcDotNet

공개 메소드들

메소드 설명
GetSendDelay ( ) : long
HandleMessageSent ( ) : void
IrcStandardFloodPreventer ( int maxMessageBurst, long counterPeriod ) : System

Initializes a new instance of the IrcStandardFloodPreventer class.

메소드 상세

GetSendDelay() 공개 메소드

public GetSendDelay ( ) : long
리턴 long

HandleMessageSent() 공개 메소드

public HandleMessageSent ( ) : void
리턴 void

IrcStandardFloodPreventer() 공개 메소드

Initializes a new instance of the IrcStandardFloodPreventer class.
public IrcStandardFloodPreventer ( int maxMessageBurst, long counterPeriod ) : System
maxMessageBurst int The maximum number of messages that can be sent in a burst.
counterPeriod long /// The number of milliseconds between each decrement of the message counter. ///
리턴 System