public void Run()
 {
     try
     {
         MockDtlsServer server     = new MockDtlsServer();
         DtlsTransport  dtlsServer = mServerProtocol.Accept(server, mServerTransport);
         byte[]         buf        = new byte[dtlsServer.GetReceiveLimit()];
         while (!isShutdown)
         {
             int length = dtlsServer.Receive(buf, 0, buf.Length, 1000);
             if (length >= 0)
             {
                 dtlsServer.Send(buf, 0, length);
             }
         }
         dtlsServer.Close();
     }
     catch (Exception e)
     {
         Console.Error.WriteLine(e.StackTrace);
     }
 }
 public void Run()
 {
     try
     {
         MockDtlsServer server = new MockDtlsServer();
         DtlsTransport dtlsServer = mServerProtocol.Accept(server, mServerTransport);
         byte[] buf = new byte[dtlsServer.GetReceiveLimit()];
         while (!isShutdown)
         {
             int length = dtlsServer.Receive(buf, 0, buf.Length, 1000);
             if (length >= 0)
             {
                 dtlsServer.Send(buf, 0, length);
             }
         }
         dtlsServer.Close();
     }
     catch (Exception e)
     {
         Console.Error.WriteLine(e.StackTrace);
     }
 }