【csharpstudy】:
if (ThdSendFile != null && ThdSendFile.IsAlive)
ThdSendFile.Abort();
if (tcplsnServer != null)
tcplsnServer.Stop();
foreach (Socket s in socketHolder.Values)
{
if (s.Connected)
s.Close();
}
foreach (Thread t in threadHolder.Values)
{
if (t.IsAlive)
t.Abort();
}
Application.Exit();