Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/Karel_en_Tom'

Bart Reedijk 10 anni fa
parent
commit
6909bf0fc6
1 ha cambiato i file con 10 aggiunte e 3 eliminazioni
  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);
+            }
         }
     }
 }