Esempio n. 1
0
 public void StopServer(bool graceful = false)
 {
     if (graceful)
     {
         connector.Stop();
         connector = null;
     }
     else
     {
         connector.Kill();
         connector = null;
     }
 }
Esempio n. 2
0
        private void btnStopNetCore_Click(object sender, EventArgs e)
        {
            if (connector == null || connector.Disposed)
            {
                MessageBox.Show("connector is null");
                return;
            }

            btnStopNetCore.Enabled = false;
            connector?.Stop();
            connector = null;
            btnStopNetCore.Enabled = true;
        }