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; }
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; }