public void Reset() { if (workSocket != null) { workSocket.Close(); } workSocket = null; state = EConnectorState.Initial; // TODO 清理buffer IsReceiving = false; IsSending = false; }
public void Release() { ipEndPoint = null; if (workSocket != null) { workSocket.Close(); } workSocket = null; state = EConnectorState.Initial; // TODO 释放buffer IsReceiving = false; IsSending = false; }
public void Reset() { if (workSocket != null) { workSocket.Close(); } workSocket = null; state = EConnectorState.Initial; isReceiving = false; isSending = false; if (sendCache != null) { sendCache.Clear(); } if (receiveCache != null) { receiveCache.Clear(); } }