diff --git a/build/dependencies.props b/build/dependencies.props
index 4ae52ddd4c..1a19185236 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -1,4 +1,4 @@
-
+
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
@@ -28,20 +28,20 @@
1.1.0
2.1.0-preview1-28117
2.0.0
- 2.1.0-preview1-26115-03
+ 2.1.0-preview2-26124-07
2.1.0-preview1-28117
15.3.0
7.0.0
- 4.5.0-preview1-26112-01
- 0.1.0-e180104-2
+ 4.5.0-preview2-26125-06
+ 0.1.0-preview2-180130-1
6.1.7601.17515
- 4.5.0-preview1-26112-01
- 4.5.0-preview1-26112-01
- 4.5.0-preview1-26112-01
- 4.5.0-preview1-26112-01
- 0.1.0-e180104-2
+ 4.5.0-preview2-26125-06
+ 4.5.0-preview2-26125-06
+ 4.5.0-preview2-26125-06
+ 4.5.0-preview2-26125-06
+ 0.1.0-preview2-180130-1
2.3.1
2.3.1
-
+
\ No newline at end of file
diff --git a/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs b/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs
index 5536833474..6690bc21a0 100644
--- a/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs
+++ b/src/Microsoft.AspNetCore.Server.IISIntegration/Server/IISHttpContext.cs
@@ -141,8 +141,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
RequestBody = new IISHttpRequestBody(this);
ResponseBody = new IISHttpResponseBody(this);
- Input = new Pipe(new PipeOptions(_memoryPool, readerScheduler: Scheduler.TaskRun));
- var pipe = new Pipe(new PipeOptions(_memoryPool, readerScheduler: Scheduler.TaskRun));
+ Input = new Pipe(new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.ThreadPool));
+ var pipe = new Pipe(new PipeOptions(_memoryPool, readerScheduler: PipeScheduler.ThreadPool));
Output = new OutputProducer(pipe);
}
@@ -165,7 +165,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
internal WindowsPrincipal WindowsUser { get; set; }
public Stream RequestBody { get; set; }
public Stream ResponseBody { get; set; }
- public IPipe Input { get; set; }
+ public Pipe Input { get; set; }
public OutputProducer Output { get; set; }
public IHeaderDictionary RequestHeaders { get; set; }
@@ -253,7 +253,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
}
finally
{
- Input.Reader.Advance(readableBuffer.End, readableBuffer.End);
+ Input.Reader.AdvanceTo(readableBuffer.End, readableBuffer.End);
}
}
}
@@ -438,22 +438,22 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
while (true)
{
// These buffers are pinned
- var wb = Input.Writer.Alloc(MinAllocBufferSize);
- _inputHandle = wb.Buffer.Retain(true);
+ var wb = Input.Writer.GetMemory(MinAllocBufferSize);
+ _inputHandle = wb.Retain(true);
try
{
int read = 0;
if (_wasUpgraded)
{
- read = await ReadWebSocketsAsync(wb.Buffer.Length);
+ read = await ReadWebSocketsAsync(wb.Length);
}
else
{
_currentOperation = _currentOperation.ContinueWith(async (t) =>
{
_currentOperationType = CurrentOperationType.Read;
- read = await ReadAsync(wb.Buffer.Length);
+ read = await ReadAsync(wb.Length);
}).Unwrap();
await _currentOperation;
}
@@ -463,15 +463,15 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
break;
}
- wb.Advance(read);
+ Input.Writer.Advance(read);
}
finally
{
- wb.Commit();
+ Input.Writer.Commit();
_inputHandle.Dispose();
}
- var result = await wb.FlushAsync();
+ var result = await Input.Writer.FlushAsync();
if (result.IsCompleted || result.IsCancelled)
{
@@ -555,19 +555,19 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
}
finally
{
- Output.Reader.Advance(consumed);
+ Output.Reader.AdvanceTo(consumed);
}
}
Output.Reader.Complete();
}
- private unsafe IISAwaitable WriteAsync(ReadOnlyBuffer buffer)
+ private unsafe IISAwaitable WriteAsync(ReadOnlyBuffer buffer)
{
var fCompletionExpected = false;
var hr = 0;
var nChunks = 0;
- if (buffer.IsSingleSpan)
+ if (buffer.IsSingleSegment)
{
nChunks = 1;
}
@@ -579,7 +579,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
}
}
- if (buffer.IsSingleSpan)
+ if (buffer.IsSingleSegment)
{
var pDataChunks = stackalloc HttpApiTypes.HTTP_DATA_CHUNK[1];
diff --git a/src/Microsoft.AspNetCore.Server.IISIntegration/Server/OutputProducer.cs b/src/Microsoft.AspNetCore.Server.IISIntegration/Server/OutputProducer.cs
index 91c664c5b3..28c2dc856b 100644
--- a/src/Microsoft.AspNetCore.Server.IISIntegration/Server/OutputProducer.cs
+++ b/src/Microsoft.AspNetCore.Server.IISIntegration/Server/OutputProducer.cs
@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.Buffers;
using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
@@ -17,7 +18,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
private bool _completed = false;
- private readonly IPipe _pipe;
+ private readonly Pipe _pipe;
// https://github.com/dotnet/corefxlab/issues/1334
// Pipelines don't support multiple awaiters on flush
@@ -26,13 +27,13 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
private readonly object _flushLock = new object();
private Action _flushCompleted;
- public OutputProducer(IPipe pipe)
+ public OutputProducer(Pipe pipe)
{
_pipe = pipe;
_flushCompleted = OnFlushCompleted;
}
- public IPipeReader Reader => _pipe.Reader;
+ public PipeReader Reader => _pipe.Reader;
public Task FlushAsync(CancellationToken cancellationToken = default(CancellationToken))
{
@@ -73,8 +74,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
ArraySegment buffer,
CancellationToken cancellationToken)
{
- var writableBuffer = default(WritableBuffer);
-
lock (_contextLock)
{
if (_completed)
@@ -82,26 +81,16 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
throw new ObjectDisposedException("Response is already completed");
}
- writableBuffer = _pipe.Writer.Alloc(1);
- // TODO obsolete
-#pragma warning disable CS0618 // Type or member is obsolete
- var writer = new WritableBufferWriter(writableBuffer);
-#pragma warning restore CS0618 // Type or member is obsolete
- if (buffer.Count > 0)
- {
- writer.Write(buffer.Array, buffer.Offset, buffer.Count);
- }
-
- writableBuffer.Commit();
+ _pipe.Writer.Write(new ReadOnlySpan(buffer.Array, buffer.Offset, buffer.Count));
}
- return FlushAsync(writableBuffer, cancellationToken);
+ return FlushAsync(_pipe.Writer, cancellationToken);
}
- private Task FlushAsync(WritableBuffer writableBuffer,
+ private Task FlushAsync(PipeWriter pipeWriter,
CancellationToken cancellationToken)
{
- var awaitable = writableBuffer.FlushAsync(cancellationToken);
+ var awaitable = pipeWriter.FlushAsync(cancellationToken);
if (awaitable.IsCompleted)
{
// The flush task can't fail today