Example #1
0
 public void Disconnect()
 {
     try
     {
         if (IsRunning)
         {
             ClientSocket.BeginDisconnect(false, ClientDisconnected, ClientSocket);
             _leaveRequest = true;
         }
     }
     catch (Exception e)
     {
         OnErrorHandled?.Invoke(e);
     }
 }