示例#1
0
文件: AgonesSDK.cs 项目: yuryu/agones
 public AgonesSDK(int healthInterval = 5, bool healthEnabled = true, double requestTimeout = 15)
 {
     this.HealthInterval = healthInterval;
     this.HealthEnabled  = healthEnabled;
     this.RequestTimeout = requestTimeout;
     this.channel        = new Channel(Host, Port, ChannelCredentials.Insecure);
     this.client         = new SDK.SDKClient(channel);
     this.healthStream   = client.Health().RequestStream;
 }
示例#2
0
 public AgonesSDK(
     double requestTimeoutSec = 15,
     SDK.SDKClient sdkClient  = null,
     CancellationTokenSource cancellationTokenSource = null,
     ILogger logger = null)
 {
     _logger           = logger;
     RequestTimeoutSec = requestTimeoutSec;
     cts          = cancellationTokenSource ?? new CancellationTokenSource();
     ctoken       = cts.Token;
     channel      = new Channel(Host, Port, ChannelCredentials.Insecure);
     client       = sdkClient ?? new SDK.SDKClient(channel);
     healthStream = client.Health().RequestStream;
 }