private void QuitChat()
{
if(connected)
{
try
{
string command = "GONE|" clientname;
Byte[] outbytes = System.Text.Encoding.ASCII.GetBytes(command.ToCharArray());
ns.Write(outbytes,0,outbytes.Length);
clientsocket.Close();
}
catch(Exception)
{
}
}
if(logging)
logwriter.Close();
if(receive != null &;&; receive.IsAlive)
receive.Abort();
this.Text = "客户端";
}