public void Dispose() { Socket?.Close(); Coder?.Dispose(); _autoResetEvent.Close(); ReadArgs?.Dispose(); WriteArgs?.Dispose(); }
public void Clear() { Socket?.Close(); Unpacker?.Clear(); _autoResetEvent?.Close(); ReadArgs?.Dispose(); WriteArgs?.Dispose(); Socket = null; ReadArgs = null; WriteArgs = null; }