Explorar o código

Merge remote-tracking branch 'origin/Karel_en_Tom'

Bart Reedijk %!s(int64=10) %!d(string=hai) anos
pai
achega
6909bf0fc6
Modificáronse 1 ficheiros con 10 adicións e 3 borrados
  1. 10 3
      Proftaak Remote Healthcare/FietsClientV2/TcpConnection.cs

+ 10 - 3
Proftaak Remote Healthcare/FietsClientV2/TcpConnection.cs

@@ -290,10 +290,17 @@ namespace FietsClient
 
         public void SendString(string s)
         {
+            try
+            {
+                byte[] b = Encoding.ASCII.GetBytes(s);
+                sslStream.Write(b, 0, b.Length);
+                sslStream.Flush();
+            }
+            catch (Exception e)
 
-            byte[] b = Encoding.ASCII.GetBytes(s);
-            sslStream.Write(b, 0, b.Length);
-            sslStream.Flush();
+            {
+                Console.WriteLine(e);
+            }
         }
     }
 }