public void CloseNotCallback() { Connection -= new ConnectionOk(OnTcpIPClientConnected); DataOn -= new DataOn(OnTcpIPClientReceived); Disconnection -= new ExceptionDisconnection(OnTcpIPClientDisconnected); TcpIPMessageQueue.EnqueueRecv(S2C_Hint.Builder(S2CHintType.Intro, "[NetworkClose]:Nothing")); base.Close(); mConnected = false; }
public override void Close() { //if (null != mSendMessageThread) //{ // mSendMessageThread.Abort(); // mSendMessageThread = null; // while (TcpIPMessageQueue.DequeueSend() != null) ; //} TcpIPMessageQueue.EnqueueRecv(S2C_Hint.Builder(S2CHintType.Intro, "[NetworkClose]:Nothing")); base.Close(); mConnected = false; Connection -= new ConnectionOk(OnTcpIPClientConnected); DataOn -= new DataOn(OnTcpIPClientReceived); Disconnection -= new ExceptionDisconnection(OnTcpIPClientDisconnected); }
public TcpIPClient() { Connection += new ConnectionOk(OnTcpIPClientConnected); DataOn += new DataOn(OnTcpIPClientReceived); Disconnection += new ExceptionDisconnection(OnTcpIPClientDisconnected); }