Skip to content

Commit d8b6823

Browse files
authored
Introduce multiplexed bedrock types (#17213)
1 parent eb552a6 commit d8b6823

File tree

68 files changed

+2641
-574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2641
-574
lines changed

src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp.cs

Lines changed: 55 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ public partial class AddressInUseException : System.InvalidOperationException
88
public AddressInUseException(string message) { }
99
public AddressInUseException(string message, System.Exception inner) { }
1010
}
11+
public abstract partial class BaseConnectionContext : System.IAsyncDisposable
12+
{
13+
protected BaseConnectionContext() { }
14+
public virtual System.Threading.CancellationToken ConnectionClosed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
15+
public abstract string ConnectionId { get; set; }
16+
public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; }
17+
public abstract System.Collections.Generic.IDictionary<object, object> Items { get; set; }
18+
public virtual System.Net.EndPoint LocalEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
19+
public virtual System.Net.EndPoint RemoteEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
20+
public abstract void Abort();
21+
public abstract void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason);
22+
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
23+
}
1124
public partial class ConnectionAbortedException : System.OperationCanceledException
1225
{
1326
public ConnectionAbortedException() { }
@@ -27,19 +40,12 @@ public static partial class ConnectionBuilderExtensions
2740
public static Microsoft.AspNetCore.Connections.IConnectionBuilder Use(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, System.Func<Microsoft.AspNetCore.Connections.ConnectionContext, System.Func<System.Threading.Tasks.Task>, System.Threading.Tasks.Task> middleware) { throw null; }
2841
public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseConnectionHandler<TConnectionHandler>(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; }
2942
}
30-
public abstract partial class ConnectionContext : System.IAsyncDisposable
43+
public abstract partial class ConnectionContext : Microsoft.AspNetCore.Connections.BaseConnectionContext, System.IAsyncDisposable
3144
{
3245
protected ConnectionContext() { }
33-
public virtual System.Threading.CancellationToken ConnectionClosed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
34-
public abstract string ConnectionId { get; set; }
35-
public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; }
36-
public abstract System.Collections.Generic.IDictionary<object, object> Items { get; set; }
37-
public virtual System.Net.EndPoint LocalEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
38-
public virtual System.Net.EndPoint RemoteEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
3946
public abstract System.IO.Pipelines.IDuplexPipe Transport { get; set; }
40-
public virtual void Abort() { }
41-
public virtual void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { }
42-
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
47+
public override void Abort() { }
48+
public override void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { }
4349
}
4450
public delegate System.Threading.Tasks.Task ConnectionDelegate(Microsoft.AspNetCore.Connections.ConnectionContext connection);
4551
public abstract partial class ConnectionHandler
@@ -123,9 +129,40 @@ public partial interface IConnectionListenerFactory
123129
{
124130
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IConnectionListener> BindAsync(System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
125131
}
126-
public partial interface IMultiplexedConnectionListenerFactory : Microsoft.AspNetCore.Connections.IConnectionListenerFactory
132+
public partial interface IMultiplexedConnectionBuilder
133+
{
134+
System.IServiceProvider ApplicationServices { get; }
135+
Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate Build();
136+
Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder Use(System.Func<Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate, Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate> middleware);
137+
}
138+
public partial interface IMultiplexedConnectionFactory
127139
{
140+
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.MultiplexedConnectionContext> ConnectAsync(System.Net.EndPoint endpoint, Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
128141
}
142+
public partial interface IMultiplexedConnectionListener : System.IAsyncDisposable
143+
{
144+
System.Net.EndPoint EndPoint { get; }
145+
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.MultiplexedConnectionContext> AcceptAsync(Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
146+
System.Threading.Tasks.ValueTask UnbindAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
147+
}
148+
public partial interface IMultiplexedConnectionListenerFactory
149+
{
150+
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IMultiplexedConnectionListener> BindAsync(System.Net.EndPoint endpoint, Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
151+
}
152+
public partial class MultiplexedConnectionBuilder : Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder
153+
{
154+
public MultiplexedConnectionBuilder(System.IServiceProvider applicationServices) { }
155+
public System.IServiceProvider ApplicationServices { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
156+
public Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate Build() { throw null; }
157+
public Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder Use(System.Func<Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate, Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate> middleware) { throw null; }
158+
}
159+
public abstract partial class MultiplexedConnectionContext : Microsoft.AspNetCore.Connections.BaseConnectionContext, System.IAsyncDisposable
160+
{
161+
protected MultiplexedConnectionContext() { }
162+
public abstract System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> AcceptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
163+
public abstract System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> ConnectAsync(Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
164+
}
165+
public delegate System.Threading.Tasks.Task MultiplexedConnectionDelegate(Microsoft.AspNetCore.Connections.MultiplexedConnectionContext connection);
129166
[System.FlagsAttribute]
130167
public enum TransferFormat
131168
{
@@ -139,14 +176,6 @@ public UriEndPoint(System.Uri uri) { }
139176
public override string ToString() { throw null; }
140177
}
141178
}
142-
namespace Microsoft.AspNetCore.Connections.Abstractions.Features
143-
{
144-
public partial interface IQuicCreateStreamFeature
145-
{
146-
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> StartBidirectionalStreamAsync();
147-
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> StartUnidirectionalStreamAsync();
148-
}
149-
}
150179
namespace Microsoft.AspNetCore.Connections.Features
151180
{
152181
public partial interface IConnectionCompleteFeature
@@ -196,15 +225,18 @@ public partial interface IMemoryPoolFeature
196225
{
197226
System.Buffers.MemoryPool<byte> MemoryPool { get; }
198227
}
199-
public partial interface IQuicStreamFeature
228+
public partial interface IProtocolErrorCodeFeature
229+
{
230+
long Error { get; set; }
231+
}
232+
public partial interface IStreamDirectionFeature
200233
{
201234
bool CanRead { get; }
202235
bool CanWrite { get; }
203-
long StreamId { get; }
204236
}
205-
public partial interface IQuicStreamListenerFeature
237+
public partial interface IStreamIdFeature
206238
{
207-
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> AcceptAsync();
239+
long StreamId { get; }
208240
}
209241
public partial interface ITlsHandshakeFeature
210242
{

src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netstandard2.0.cs

Lines changed: 55 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ public partial class AddressInUseException : System.InvalidOperationException
88
public AddressInUseException(string message) { }
99
public AddressInUseException(string message, System.Exception inner) { }
1010
}
11+
public abstract partial class BaseConnectionContext : System.IAsyncDisposable
12+
{
13+
protected BaseConnectionContext() { }
14+
public virtual System.Threading.CancellationToken ConnectionClosed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
15+
public abstract string ConnectionId { get; set; }
16+
public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; }
17+
public abstract System.Collections.Generic.IDictionary<object, object> Items { get; set; }
18+
public virtual System.Net.EndPoint LocalEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
19+
public virtual System.Net.EndPoint RemoteEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
20+
public abstract void Abort();
21+
public abstract void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason);
22+
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
23+
}
1124
public partial class ConnectionAbortedException : System.OperationCanceledException
1225
{
1326
public ConnectionAbortedException() { }
@@ -27,19 +40,12 @@ public static partial class ConnectionBuilderExtensions
2740
public static Microsoft.AspNetCore.Connections.IConnectionBuilder Use(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, System.Func<Microsoft.AspNetCore.Connections.ConnectionContext, System.Func<System.Threading.Tasks.Task>, System.Threading.Tasks.Task> middleware) { throw null; }
2841
public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseConnectionHandler<TConnectionHandler>(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler { throw null; }
2942
}
30-
public abstract partial class ConnectionContext : System.IAsyncDisposable
43+
public abstract partial class ConnectionContext : Microsoft.AspNetCore.Connections.BaseConnectionContext, System.IAsyncDisposable
3144
{
3245
protected ConnectionContext() { }
33-
public virtual System.Threading.CancellationToken ConnectionClosed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
34-
public abstract string ConnectionId { get; set; }
35-
public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; }
36-
public abstract System.Collections.Generic.IDictionary<object, object> Items { get; set; }
37-
public virtual System.Net.EndPoint LocalEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
38-
public virtual System.Net.EndPoint RemoteEndPoint { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
3946
public abstract System.IO.Pipelines.IDuplexPipe Transport { get; set; }
40-
public virtual void Abort() { }
41-
public virtual void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { }
42-
public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
47+
public override void Abort() { }
48+
public override void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) { }
4349
}
4450
public delegate System.Threading.Tasks.Task ConnectionDelegate(Microsoft.AspNetCore.Connections.ConnectionContext connection);
4551
public abstract partial class ConnectionHandler
@@ -123,9 +129,40 @@ public partial interface IConnectionListenerFactory
123129
{
124130
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IConnectionListener> BindAsync(System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
125131
}
126-
public partial interface IMultiplexedConnectionListenerFactory : Microsoft.AspNetCore.Connections.IConnectionListenerFactory
132+
public partial interface IMultiplexedConnectionBuilder
133+
{
134+
System.IServiceProvider ApplicationServices { get; }
135+
Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate Build();
136+
Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder Use(System.Func<Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate, Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate> middleware);
137+
}
138+
public partial interface IMultiplexedConnectionFactory
127139
{
140+
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.MultiplexedConnectionContext> ConnectAsync(System.Net.EndPoint endpoint, Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
128141
}
142+
public partial interface IMultiplexedConnectionListener : System.IAsyncDisposable
143+
{
144+
System.Net.EndPoint EndPoint { get; }
145+
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.MultiplexedConnectionContext> AcceptAsync(Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
146+
System.Threading.Tasks.ValueTask UnbindAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
147+
}
148+
public partial interface IMultiplexedConnectionListenerFactory
149+
{
150+
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IMultiplexedConnectionListener> BindAsync(System.Net.EndPoint endpoint, Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
151+
}
152+
public partial class MultiplexedConnectionBuilder : Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder
153+
{
154+
public MultiplexedConnectionBuilder(System.IServiceProvider applicationServices) { }
155+
public System.IServiceProvider ApplicationServices { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
156+
public Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate Build() { throw null; }
157+
public Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder Use(System.Func<Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate, Microsoft.AspNetCore.Connections.MultiplexedConnectionDelegate> middleware) { throw null; }
158+
}
159+
public abstract partial class MultiplexedConnectionContext : Microsoft.AspNetCore.Connections.BaseConnectionContext, System.IAsyncDisposable
160+
{
161+
protected MultiplexedConnectionContext() { }
162+
public abstract System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> AcceptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
163+
public abstract System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> ConnectAsync(Microsoft.AspNetCore.Http.Features.IFeatureCollection features = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
164+
}
165+
public delegate System.Threading.Tasks.Task MultiplexedConnectionDelegate(Microsoft.AspNetCore.Connections.MultiplexedConnectionContext connection);
129166
[System.FlagsAttribute]
130167
public enum TransferFormat
131168
{
@@ -139,14 +176,6 @@ public UriEndPoint(System.Uri uri) { }
139176
public override string ToString() { throw null; }
140177
}
141178
}
142-
namespace Microsoft.AspNetCore.Connections.Abstractions.Features
143-
{
144-
public partial interface IQuicCreateStreamFeature
145-
{
146-
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> StartBidirectionalStreamAsync();
147-
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> StartUnidirectionalStreamAsync();
148-
}
149-
}
150179
namespace Microsoft.AspNetCore.Connections.Features
151180
{
152181
public partial interface IConnectionCompleteFeature
@@ -196,15 +225,18 @@ public partial interface IMemoryPoolFeature
196225
{
197226
System.Buffers.MemoryPool<byte> MemoryPool { get; }
198227
}
199-
public partial interface IQuicStreamFeature
228+
public partial interface IProtocolErrorCodeFeature
229+
{
230+
long Error { get; set; }
231+
}
232+
public partial interface IStreamDirectionFeature
200233
{
201234
bool CanRead { get; }
202235
bool CanWrite { get; }
203-
long StreamId { get; }
204236
}
205-
public partial interface IQuicStreamListenerFeature
237+
public partial interface IStreamIdFeature
206238
{
207-
System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> AcceptAsync();
239+
long StreamId { get; }
208240
}
209241
public partial interface ITlsHandshakeFeature
210242
{

0 commit comments

Comments
 (0)