Ejemplo n.º 1
0
 private void ServerTimeOut(bool isTimeOut)
 {
     if (!this.IsDisposed)
     {
         Invoke(new MethodInvoker(() => {
             serverStatus.Text      = isTimeOut ? "החיבור אבד" : "מחובר";
             serverStatus.ForeColor = isTimeOut ? Color.Red : Color.DarkGreen;
         }));
         if (isTimeOut)
         {
             sendSocket.Disconnect();
             configServerConnection();
             //ServerTimeOut(!sendSocket.Connect());
         }
     }
 }
Ejemplo n.º 2
0
 public void Disconnect()
 {
     if (socket != null)
     {
         socket.Disconnect();
     }
 }