mirror of
https://github.com/Azure/DotNetty.git
synced 2026-10-24 09:45:04 +08:00
Motivation: At the present moment documentation of DotNetty is almost non-existent. Moreover there are no examples that can be used as starting point for the library learning. This commit is mean to provide basic client-server echo example over secure pipeline. Modification: - Created an examples directory to be used in the future for possible examples projects. - Added two console projects used to establish server-client connection with basic secure DotNetty echo pipeline. Result: New console projects have been created under /examples directory.
35 lines
795 B
C#
35 lines
795 B
C#
using System;
|
|
using System.Configuration;
|
|
|
|
namespace Echo.Client
|
|
{
|
|
using System.Net;
|
|
|
|
public static class EchoClientSettings
|
|
{
|
|
public static bool IsSsl
|
|
{
|
|
get
|
|
{
|
|
string ssl = ConfigurationManager.AppSettings["ssl"];
|
|
return !string.IsNullOrEmpty(ssl) && bool.Parse(ssl);
|
|
}
|
|
}
|
|
|
|
public static IPAddress Host
|
|
{
|
|
get { return IPAddress.Parse(ConfigurationManager.AppSettings["host"]); }
|
|
}
|
|
|
|
public static int Port
|
|
{
|
|
get { return int.Parse(ConfigurationManager.AppSettings["port"]); }
|
|
}
|
|
|
|
public static int Size
|
|
{
|
|
get { return int.Parse(ConfigurationManager.AppSettings["size"]); }
|
|
}
|
|
}
|
|
}
|