Added CSharp example for multi-threaded TLS server. Refactor to separate the ssl and ctx handles.

This commit is contained in:
David Garske
2020-03-19 12:56:19 -07:00
parent a28fc5e70b
commit a8f2c97e13
16 changed files with 631 additions and 124 deletions

View File

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