mirror of
https://github.com/Azure/DotNetty.git
synced 2026-10-19 06:31:20 +08:00
34 lines
988 B
C#
34 lines
988 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
namespace Examples.Common
|
|
{
|
|
using System.Net;
|
|
|
|
public class ClientSettings
|
|
{
|
|
public static bool IsSsl
|
|
{
|
|
get
|
|
{
|
|
string ssl = ExampleHelper.Configuration["ssl"];
|
|
return !string.IsNullOrEmpty(ssl) && bool.Parse(ssl);
|
|
}
|
|
}
|
|
|
|
public static IPAddress Host => IPAddress.Parse(ExampleHelper.Configuration["host"]);
|
|
|
|
public static int Port => int.Parse(ExampleHelper.Configuration["port"]);
|
|
|
|
public static int Size => int.Parse(ExampleHelper.Configuration["size"]);
|
|
|
|
public static bool UseLibuv
|
|
{
|
|
get
|
|
{
|
|
string libuv = ExampleHelper.Configuration["libuv"];
|
|
return !string.IsNullOrEmpty(libuv) && bool.Parse(libuv);
|
|
}
|
|
}
|
|
}
|
|
} |