public void Dispose() { while (_asyncReadQueue.TryDequeue(out var token)) { try { token.SetException(new Exception("Error: Disposing...")); } catch { } } while (_asyncWriteQueue.TryDequeue(out var token)) { try { token.SetException(new Exception("Error: Disposing...")); } catch { } } _asyncTransferPool.Dispose(); _asyncConnectArgs.Dispose(); }
public void Dispose() { _asyncTransferPool.Dispose(); _asyncConnectArgs.Dispose(); }