Files
DotNetty/examples/Echo.Client/ClientSettings.cs
T
Bartosz Sypytkowski 6e1733a5b1 Echo client-server example
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.
2015-10-15 18:01:22 +02:00

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"]); }
}
}
}