C# Class NetworkCommsDotNet.Tools.DOSProtection

NetworkComms.Net class used for providing Denial Of Service (DOS) protection features. If enabled, malformed data events and connection initialises are tracked. If above set thresholds IPAddresses are banned.
ファイルを表示 Open project: MarcFletcher/NetworkComms.Net Class Usage Examples

Public Methods

Method Description
DOSProtection ( ) : System

Initialise a new instance of DOS protection.

LogConnectionInitialise ( IPAddress remoteIPAddress ) : bool

Log a connection initialisation for the provided remote IPAddress.

LogMalformedData ( IPAddress remoteIPAddress ) : bool

Log a malformed data event for the provided remote IPAddress.

RemoteIPAddressBanned ( IPAddress remoteIPAddress ) : bool

Returns true if the provided IPAddress has been banned due to DOSProtection.

Method Details

DOSProtection() public method

Initialise a new instance of DOS protection.
public DOSProtection ( ) : System
return System

LogConnectionInitialise() public method

Log a connection initialisation for the provided remote IPAddress.
public LogConnectionInitialise ( IPAddress remoteIPAddress ) : bool
remoteIPAddress IPAddress
return bool

LogMalformedData() public method

Log a malformed data event for the provided remote IPAddress.
public LogMalformedData ( IPAddress remoteIPAddress ) : bool
remoteIPAddress IPAddress
return bool

RemoteIPAddressBanned() public method

Returns true if the provided IPAddress has been banned due to DOSProtection.
public RemoteIPAddressBanned ( IPAddress remoteIPAddress ) : bool
remoteIPAddress IPAddress The IPAddress to check
return bool