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

@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
using System;
using System.Runtime.InteropServices;
@@ -165,7 +165,7 @@ public class wolfSSL_TLS_PSK_Server
if (wolfssl.set_fd(ssl, fd) != wolfssl.SUCCESS)
{
/* get and print out the error */
Console.Write(wolfssl.get_error(ssl));
Console.WriteLine(wolfssl.get_error(ssl));
tcp.Stop();
clean(ssl, ctx);
return;
@@ -176,7 +176,7 @@ public class wolfSSL_TLS_PSK_Server
if (wolfssl.accept(ssl) != wolfssl.SUCCESS)
{
/* get and print out the error */
Console.Write(wolfssl.get_error(ssl));
Console.WriteLine(wolfssl.get_error(ssl));
tcp.Stop();
clean(ssl, ctx);
return;