-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Implement new bedrock listener abstraction and re-plat Kestrel on top #10321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
42622b7
5d91d92
b4e7ac8
a605520
582cbbf
6d539b1
2c797d0
daec056
a2281c2
c471ce0
3f864d4
60efcbd
17fa5fc
789ae16
edf0557
c1f9f13
834811f
7592ba4
2ff8603
f44caae
1e4fcfe
3303a6a
603aff3
178a5c2
e98e534
ca66f11
4d85641
cb665fc
7e8c1fe
cd12e5e
e06f099
9990930
cdf5213
ec6ae60
a5838f2
fcdf072
1b9f718
5d2d82e
34dc284
1a5652e
a105f8b
5ecfb4f
2e2e2b5
85f16f9
9e5cd63
c5b27b2
c41a6ab
ba6ae60
77d3c27
4977f1b
83754d2
eb73fc8
cbf6063
1c29e3b
288d4e0
dd162c9
e0f1348
13a8b49
89c6410
3301c1e
148bcfa
0930aa6
8a91fb1
dbe8832
bf48a2a
ff56f85
f0e7f42
1a143b7
f918162
f6fe012
98d6afb
e488e07
9e341c3
21ac350
940e6fa
1cec23c
c4cdab0
74868c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Net; | ||
halter73 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
namespace Microsoft.AspNetCore.Connections.Features | ||
{ | ||
public interface IConnectionEndPointFeature | ||
{ | ||
EndPoint LocalEndPoint { get; set; } | ||
EndPoint RemoteEndPoint { get; set; } | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Net; | ||
|
||
namespace Microsoft.AspNetCore.Connections | ||
{ | ||
public class FileHandleEndPoint : EndPoint | ||
{ | ||
public FileHandleEndPoint(ulong fileHandle, FileHandleType fileHandleType) | ||
{ | ||
FileHandle = fileHandle; | ||
FileHandleType = fileHandleType; | ||
|
||
switch (fileHandleType) | ||
{ | ||
case FileHandleType.Auto: | ||
case FileHandleType.Tcp: | ||
case FileHandleType.Pipe: | ||
break; | ||
default: | ||
throw new NotSupportedException(); | ||
} | ||
} | ||
|
||
public ulong FileHandle { get; } | ||
public FileHandleType FileHandleType { get; } | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Net; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.AspNetCore.Connections | ||
{ | ||
public interface IConnectionListener | ||
{ | ||
EndPoint EndPoint { get; } | ||
|
||
ValueTask<ConnectionContext> AcceptAsync(CancellationToken cancellationToken = default); | ||
|
||
ValueTask UnbindAsync(CancellationToken cancellationToken = default); | ||
|
||
ValueTask DisposeAsync(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the interface be bassed on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I just hacked it because this is ns2.0. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh...thx. |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Net; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.AspNetCore.Connections | ||
{ | ||
public interface IConnectionListenerFactory | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How nice would it be to avoid the word factory? Maybe IEndpointBinder? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not changing the name in this PR, we agreed to this one in the meeting, we can iterate on the issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That said, I don't disagree |
||
{ | ||
ValueTask<IConnectionListener> BindAsync(EndPoint endpoint, CancellationToken cancellationToken = default); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.