if (threadwatch !=null)
{
socketwatch.Shutdown(SocketShutdown.Both);
threadwatch.Abort();
socketwatch.Close();
this.button3.Enabled = false;
button1.Enabled = true;
textBox3.Text = "服务器关闭成功!";
}
}
catch (Exception ex)
{
throw new Exception(ex.Message);
启动服务以后 点击关闭按钮 报错啦
|