/// <summary> /// Reset the object to init state. /// </summary> public void Reset() { Tag = null; // ClientSocket = null; // ClientID = default(long); IPEndPoint = null; ReceiveBuffer?.Clear(); SendBuffer?.Clear(); RecvSpeedController?.Reset(); SendController?.Reset(); }
/// <summary> /// Reset the object to init state. /// </summary> public void Reset() { Tag = null; ClientSocket = null; ClientID = default(long); IPEndPoint = null; ReceiveBuffer?.Clear(); Groups = null; Status = ClientStatus.Closed; RecvSpeedController?.Reset(); SendController?.Reset(); RecvRawMessage.ClientID = default(long); RecvRawMessage.MessageRawData = default(ArraySegment <byte>); if (SockAsyncArgs != null) { SockAsyncArgs.AcceptSocket = null; SockAsyncArgs.UserToken = null; } }