public void Close() { // send endmessage to client, disconnect, abort client threat Send(endMessage); Clientsocket.Close(1); clientReceiveThread.Abort(); }
public void Disconnect() { Clientsocket.Shutdown(SocketShutdown.Both); Clientsocket.Close(); //清空数据 Clientsocket = null; isReceiveProcessing = false; clientdataCache.Clear(); }