Added CSharp example for multi-threaded TLS server. Refactor to separate the ssl and ctx handles.
This commit is contained in:
@@ -28,7 +28,7 @@ using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using wolfSSL.CSharp;
|
||||
|
||||
public class wolfSSL_TLS_CSHarp
|
||||
public class wolfSSL_TLS_Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Example of a logging function
|
||||
@@ -163,7 +163,7 @@ public class wolfSSL_TLS_CSHarp
|
||||
if (wolfssl.set_fd(ssl, tcp) != wolfssl.SUCCESS)
|
||||
{
|
||||
/* get and print out the error */
|
||||
Console.Write(wolfssl.get_error(ssl));
|
||||
Console.WriteLine(wolfssl.get_error(ssl));
|
||||
tcp.Close();
|
||||
clean(ssl, ctx);
|
||||
return;
|
||||
@@ -174,7 +174,7 @@ public class wolfSSL_TLS_CSHarp
|
||||
if (wolfssl.connect(ssl) != wolfssl.SUCCESS)
|
||||
{
|
||||
/* get and print out the error */
|
||||
Console.Write(wolfssl.get_error(ssl));
|
||||
Console.WriteLine(wolfssl.get_error(ssl));
|
||||
tcp.Close();
|
||||
clean(ssl, ctx);
|
||||
return;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ProjectGuid>{B9DF2972-38F6-4B42-B228-E3C1A47DF8E8}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>wolfSSL_TLS_CSharp</RootNamespace>
|
||||
<RootNamespace>wolfSSL_TLS_Client</RootNamespace>
|
||||
<AssemblyName>wolfSSL-TLS-Client</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
||||
Reference in New Issue
Block a user