C# Class Shadowsocks.Controller.Strategy.SimplyChooseByStatisticsStrategy

Inheritance: IStrategy
Datei anzeigen Open project: nladuo/AutoShadowsocks

Public Methods

Method Description
GetAServer ( IStrategyCallerType type, IPEndPoint localIPEndPoint ) : Server
ReloadServers ( ) : void
SetFailure ( Server server ) : void
SimplyChooseByStatisticsStrategy ( ShadowsocksController controller ) : System
UpdateLastRead ( Server server ) : void
UpdateLastWrite ( Server server ) : void
UpdateLatency ( Server server, System.TimeSpan latency ) : void

Private Methods

Method Description
ChooseNewServer ( List servers ) : void
GetScore ( StatisticsData data ) : double
LoadStatistics ( ) : void
ReloadStatisticsAndChooseAServer ( object obj ) : void

Method Details

GetAServer() public method

public GetAServer ( IStrategyCallerType type, IPEndPoint localIPEndPoint ) : Server
type IStrategyCallerType
localIPEndPoint System.Net.IPEndPoint
return Shadowsocks.Model.Server

ReloadServers() public method

public ReloadServers ( ) : void
return void

SetFailure() public method

public SetFailure ( Server server ) : void
server Shadowsocks.Model.Server
return void

SimplyChooseByStatisticsStrategy() public method

public SimplyChooseByStatisticsStrategy ( ShadowsocksController controller ) : System
controller ShadowsocksController
return System

UpdateLastRead() public method

public UpdateLastRead ( Server server ) : void
server Shadowsocks.Model.Server
return void

UpdateLastWrite() public method

public UpdateLastWrite ( Server server ) : void
server Shadowsocks.Model.Server
return void

UpdateLatency() public method

public UpdateLatency ( Server server, System.TimeSpan latency ) : void
server Shadowsocks.Model.Server
latency System.TimeSpan
return void