2 types derived from ListenOptions
Microsoft.AspNetCore.Server.Kestrel.Core (2)
AnyIPListenOptions.cs (1)
11
internal sealed class AnyIPListenOptions :
ListenOptions
LocalhostListenOptions.cs (1)
10
internal sealed class LocalhostListenOptions :
ListenOptions
8 instantiations of ListenOptions
Microsoft.AspNetCore.Server.Kestrel.Core (8)
Internal\AddressBinder.cs (3)
122
options = new
ListenOptions
(parsedAddress.UnixPipePath);
126
options = new
ListenOptions
(new NamedPipeEndPoint(parsedAddress.NamedPipeName));
135
options = new
ListenOptions
(endpoint);
KestrelServerOptions.cs (4)
523
var listenOptions = new
ListenOptions
(endPoint);
589
var listenOptions = new
ListenOptions
(socketPath);
611
var listenOptions = new
ListenOptions
(handle);
634
var listenOptions = new
ListenOptions
(new NamedPipeEndPoint(pipeName));
ListenOptions.cs (1)
236
var options = new
ListenOptions
(new IPEndPoint(address, IPEndPoint!.Port))
310 references to ListenOptions
Aspire.Dashboard (1)
Authentication\Connection\ListenOptionsConnectionTypeExtensions.cs (1)
10
public static void UseConnectionTypes(this
ListenOptions
listenOptions, ConnectionType[] connectionTypes)
Aspire.Dashboard.Tests (1)
Integration\DashboardClientAuthTests.cs (1)
97
void ConfigureListen(
ListenOptions
options)
Aspire.Hosting (1)
Dashboard\DashboardServiceHost.cs (1)
160
void ConfigureListen(
ListenOptions
options)
InMemory.FunctionalTests (65)
ConnectionLimitTests.cs (1)
237
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
ConnectionMiddlewareTests.cs (8)
39
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
135
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
158
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
184
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
211
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
243
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
271
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
302
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
HttpProtocolSelectionTests.cs (2)
62
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
81
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
HttpsConnectionMiddlewareTests.cs (41)
53
void ConfigureListenOptions(
ListenOptions
listenOptions)
86
void ConfigureListenOptions(
ListenOptions
listenOptions)
107
void ConfigureListenOptions(
ListenOptions
listenOptions)
130
void ConfigureListenOptions(
ListenOptions
listenOptions)
170
void ConfigureListenOptions(
ListenOptions
listenOptions)
225
void ConfigureListenOptions(
ListenOptions
listenOptions)
250
void ConfigureListenOptions(
ListenOptions
listenOptions)
278
Assert.Throws<ArgumentException>(() => CreateMiddleware(new HttpsConnectionAdapterOptions(),
ListenOptions
.DefaultHttpProtocols));
284
void ConfigureListenOptions(
ListenOptions
listenOptions)
304
void ConfigureListenOptions(
ListenOptions
listenOptions)
335
void ConfigureListenOptions(
ListenOptions
listenOptions)
368
void ConfigureListenOptions(
ListenOptions
listenOptions)
410
void ConfigureListenOptions(
ListenOptions
listenOptions)
440
void ConfigureListenOptions(
ListenOptions
listenOptions)
472
void ConfigureListenOptions(
ListenOptions
listenOptions)
503
void ConfigureListenOptions(
ListenOptions
listenOptions)
539
void ConfigureListenOptions(
ListenOptions
listenOptions)
583
void ConfigureListenOptions(
ListenOptions
listenOptions)
624
void ConfigureListenOptions(
ListenOptions
listenOptions)
665
void ConfigureListenOptions(
ListenOptions
listenOptions)
709
void ConfigureListenOptions(
ListenOptions
listenOptions)
757
void ConfigureListenOptions(
ListenOptions
listenOptions)
826
void ConfigureListenOptions(
ListenOptions
listenOptions)
881
void ConfigureListenOptions(
ListenOptions
listenOptions)
923
static void ConfigureListenOptions(
ListenOptions
listenOptions)
951
static void ConfigureListenOptions(
ListenOptions
listenOptions)
983
static void ConfigureListenOptions(
ListenOptions
listenOptions)
1018
void ConfigureListenOptions(
ListenOptions
listenOptions)
1065
void ConfigureListenOptions(
ListenOptions
listenOptions)
1117
void ConfigureListenOptions(
ListenOptions
listenOptions)
1132
void ConfigureListenOptions(
ListenOptions
listenOptions)
1167
void ConfigureListenOptions(
ListenOptions
listenOptions)
1200
void ConfigureListenOptions(
ListenOptions
listenOptions)
1226
void ConfigureListenOptions(
ListenOptions
listenOptions)
1249
void ConfigureListenOptions(
ListenOptions
listenOptions)
1274
void ConfigureListenOptions(
ListenOptions
listenOptions)
1333
ListenOptions
.DefaultHttpProtocols);
1353
ListenOptions
.DefaultHttpProtocols));
1373
ListenOptions
.DefaultHttpProtocols,
1387
void ConfigureListenOptions(
ListenOptions
listenOptions)
1474
ListenOptions
.DefaultHttpProtocols);
KestrelMetricsTests.cs (5)
46
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
109
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
323
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
441
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
493
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
ResponseDrainingTests.cs (3)
15
public static TheoryData<
ListenOptions
> ConnectionMiddlewareData => new TheoryData<
ListenOptions
>
23
public async Task ConnectionClosedWhenResponseNotDrainedAtMinimumDataRate(
ListenOptions
listenOptions)
src\Servers\Kestrel\shared\test\TestContextFactory.cs (2)
111
Func<
ListenOptions
, Task> createBinding)
126
Func<
ListenOptions
, CancellationToken, Task> createBinding)
TestTransport\TestServer.cs (3)
49
public TestServer(RequestDelegate app, TestServiceContext context,
ListenOptions
listenOptions)
54
public TestServer(RequestDelegate app, TestServiceContext context, Action<
ListenOptions
> configureListenOptions)
57
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
Microsoft.AspNetCore.Server.Kestrel.Core (187)
EndpointConfiguration.cs (2)
15
internal EndpointConfiguration(bool isHttps,
ListenOptions
listenOptions, HttpsConnectionAdapterOptions httpsOptions, IConfigurationSection configSection)
31
public
ListenOptions
ListenOptions { get; }
HttpsConfigurationService.cs (11)
27
private Action<FeatureCollection,
ListenOptions
, ILogger<HttpsConnectionMiddleware>>? _populateMultiplexedTransportFeatures;
28
private Func<
ListenOptions
,
ListenOptions
>? _useHttpsWithDefaults;
88
public
ListenOptions
UseHttpsWithSni(
ListenOptions
listenOptions, HttpsConnectionAdapterOptions httpsOptions, EndpointConfig endpoint)
103
public void PopulateMultiplexedTransportFeatures(FeatureCollection features,
ListenOptions
listenOptions)
110
public
ListenOptions
UseHttpsWithDefaults(
ListenOptions
listenOptions)
144
internal static void PopulateMultiplexedTransportFeaturesWorker(FeatureCollection features,
ListenOptions
listenOptions, ILogger<HttpsConnectionMiddleware> logger)
181
internal static
ListenOptions
UseHttpsWithDefaultsWorker(
ListenOptions
listenOptions)
IHttpsConfigurationService.cs (9)
50
/// Calls an appropriate overload of <see cref="Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(
ListenOptions
)"/>
53
/// <returns>Updated <see cref="
ListenOptions
"/> for convenient chaining.</returns>
57
ListenOptions
UseHttpsWithSni(
ListenOptions
listenOptions, HttpsConnectionAdapterOptions httpsOptions, EndpointConfig endpoint);
74
void PopulateMultiplexedTransportFeatures(FeatureCollection features,
ListenOptions
listenOptions);
77
/// Calls <see cref="Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(
ListenOptions
)"/>
80
/// <returns>Updated <see cref="
ListenOptions
"/> for convenient chaining.</returns>
84
ListenOptions
UseHttpsWithDefaults(
ListenOptions
listenOptions);
Internal\AddressBindContext.cs (2)
14
Func<
ListenOptions
, CancellationToken, Task> createBinding)
28
public Func<
ListenOptions
, CancellationToken, Task> CreateBinding { get; }
Internal\AddressBinder.cs (21)
19
public static Task BindAsync(
ListenOptions
[] listenOptions, AddressBindContext context, Func<
ListenOptions
,
ListenOptions
> useHttps, CancellationToken cancellationToken)
35
private static IStrategy CreateStrategy(
ListenOptions
[] listenOptions, string[] addresses, bool preferAddresses, Func<
ListenOptions
,
ListenOptions
> useHttps)
86
internal static async Task BindEndpointAsync(
ListenOptions
endpoint, AddressBindContext context, CancellationToken cancellationToken)
100
internal static
ListenOptions
ParseAddress(string address, out bool https)
119
ListenOptions
? options = null;
155
var
httpDefault = ParseAddress(Constants.DefaultServerAddress, out _);
168
public OverrideWithAddressesStrategy(IReadOnlyCollection<string> addresses, Func<
ListenOptions
,
ListenOptions
> useHttps)
189
public OverrideWithEndpointsStrategy(IReadOnlyCollection<
ListenOptions
> endpoints, string[] originalAddresses)
208
private readonly IReadOnlyCollection<
ListenOptions
> _endpoints;
210
public EndpointsStrategy(IReadOnlyCollection<
ListenOptions
> endpoints)
217
foreach (
var
endpoint in _endpoints)
227
private readonly Func<
ListenOptions
,
ListenOptions
> _useHttps;
229
public AddressesStrategy(IReadOnlyCollection<string> addresses, Func<
ListenOptions
,
ListenOptions
> useHttps)
239
var
options = ParseAddress(address, out var https);
Internal\ConfigurationReader.cs (6)
305
(Protocols ??
ListenOptions
.DefaultHttpProtocols) == (other.Protocols ??
ListenOptions
.DefaultHttpProtocols) &&
313
Protocols ??
ListenOptions
.DefaultHttpProtocols, SslProtocols ?? System.Security.Authentication.SslProtocols.None,
347
(Protocols ??
ListenOptions
.DefaultHttpProtocols) == (other.Protocols ??
ListenOptions
.DefaultHttpProtocols) &&
353
Protocols ??
ListenOptions
.DefaultHttpProtocols, SslProtocols ?? System.Security.Authentication.SslProtocols.None,
Internal\Infrastructure\TransportManager.cs (1)
65
public async Task<EndPoint> BindAsync(EndPoint endPoint, MultiplexedConnectionDelegate multiplexedConnectionDelegate,
ListenOptions
listenOptions, CancellationToken cancellationToken)
Internal\KestrelServerImpl.cs (4)
135
async Task OnBind(
ListenOptions
options, CancellationToken onBindCancellationToken)
363
foreach (
var
lo in endpointsToStop)
369
foreach (
var
listenOption in endpointsToStop)
384
foreach (
var
listenOption in endpointsToStart)
KestrelConfigurationLoader.cs (17)
99
public KestrelConfigurationLoader Endpoint(IPAddress address, int port, Action<
ListenOptions
> configure)
114
public KestrelConfigurationLoader Endpoint(IPEndPoint endPoint, Action<
ListenOptions
> configure)
137
public KestrelConfigurationLoader LocalhostEndpoint(int port, Action<
ListenOptions
> configure)
157
public KestrelConfigurationLoader AnyIPEndpoint(int port, Action<
ListenOptions
> configure)
177
public KestrelConfigurationLoader UnixSocketEndpoint(string socketPath, Action<
ListenOptions
> configure)
202
public KestrelConfigurationLoader NamedPipeEndpoint(string pipeName, Action<
ListenOptions
> configure)
223
public KestrelConfigurationLoader HandleEndpoint(ulong handle, Action<
ListenOptions
> configure)
237
internal void ApplyEndpointDefaults(
ListenOptions
listenOptions)
333
internal (List<
ListenOptions
>, List<
ListenOptions
>) Reload()
341
var endpointsToStart = new List<
ListenOptions
>();
342
var endpointsToReuse = new List<
ListenOptions
>();
359
var
listenOptions = AddressBinder.ParseAddress(endpoint.Url, out var https);
390
var matchingBoundEndpoints = new List<
ListenOptions
>();
391
foreach (
var
o in endpointsToStop)
453
foreach (
var
endpointToStart in endpointsToStart)
477
foreach (
var
endpointToStop in endpointsToStop)
KestrelServer.cs (5)
87
public void PopulateMultiplexedTransportFeatures(FeatureCollection features,
ListenOptions
listenOptions)
92
public
ListenOptions
UseHttpsWithDefaults(
ListenOptions
listenOptions)
107
public
ListenOptions
UseHttpsWithSni(
ListenOptions
listenOptions, HttpsConnectionAdapterOptions httpsOptions, EndpointConfig endpoint)
KestrelServerOptions.cs (28)
74
internal List<
ListenOptions
> CodeBackedListenOptions { get; } = new List<
ListenOptions
>();
75
internal List<
ListenOptions
> ConfigurationBackedListenOptions { get; } = new List<
ListenOptions
>();
77
internal
ListenOptions
[] GetListenOptions()
82
return Array.Empty<
ListenOptions
>();
85
var result = new
ListenOptions
[resultCount];
92
internal List<
ListenOptions
> OptionsInUse { get; } = new List<
ListenOptions
>();
151
[Obsolete($"This property is obsolete and will be removed in a future version. It no longer has any impact on runtime behavior. Use {nameof(Microsoft.AspNetCore.Server.Kestrel.Core.
ListenOptions
)}.{nameof(Microsoft.AspNetCore.Server.Kestrel.Core.
ListenOptions
.DisableAltSvcHeader)} to configure \"Alt-Svc\" behavior.", error: true)]
194
private Action<
ListenOptions
> EndpointDefaults { get; set; } = _ => { };
259
public void ConfigureEndpointDefaults(Action<
ListenOptions
> configureOptions)
264
internal void ApplyEndpointDefaults(
ListenOptions
listenOptions)
360
writer.WritePropertyName(nameof(
ListenOptions
));
362
foreach (
var
listenOptions in OptionsInUse)
481
public void Listen(IPAddress address, int port, Action<
ListenOptions
> configure)
509
public void Listen(IPEndPoint endPoint, Action<
ListenOptions
> configure)
518
public void Listen(EndPoint endPoint, Action<
ListenOptions
> configure)
523
var
listenOptions = new ListenOptions(endPoint);
539
public void ListenLocalhost(int port, Action<
ListenOptions
> configure)
557
public void ListenAnyIP(int port, Action<
ListenOptions
> configure)
579
public void ListenUnixSocket(string socketPath, Action<
ListenOptions
> configure)
589
var
listenOptions = new ListenOptions(socketPath);
607
public void ListenHandle(ulong handle, Action<
ListenOptions
> configure)
611
var
listenOptions = new ListenOptions(handle);
629
public void ListenNamedPipe(string pipeName, Action<
ListenOptions
> configure)
634
var
listenOptions = new ListenOptions(new NamedPipeEndPoint(pipeName));
ListenOptions.cs (7)
58
/// Only set if the <see cref="
ListenOptions
"/> is bound to a <see cref="System.Net.IPEndPoint"/>.
66
/// Only set if the <see cref="
ListenOptions
"/> is bound to a <see cref="UnixDomainSocketEndPoint"/>.
74
/// Only set if the <see cref="
ListenOptions
"/> is bound to a <see cref="NamedPipeEndPoint"/>.
82
/// Only set if the <see cref="
ListenOptions
"/> is bound to a <see cref="FileHandleEndPoint"/>.
169
/// Configured by the <c>UseHttps()</c> and <see cref="Hosting.ListenOptionsConnectionLoggingExtensions.UseConnectionLogging(
ListenOptions
)"/>
234
protected internal
ListenOptions
Clone(IPAddress address)
236
var
options = new ListenOptions(new IPEndPoint(address, IPEndPoint!.Port))
ListenOptionsHttpsExtensions.cs (61)
17
/// Extension methods for <see cref="
ListenOptions
"/> that configure Kestrel to use HTTPS for a given endpoint.
25
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
26
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
27
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions) => listenOptions.UseHttps(_ => { });
32
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
35
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
36
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, string fileName)
45
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
49
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
50
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, string fileName, string? password)
59
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
63
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
64
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, string fileName, string? password,
74
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
77
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
78
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject)
84
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
88
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
89
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject, bool allowInvalid)
95
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
100
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
101
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject, bool allowInvalid, StoreLocation location)
107
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
113
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
114
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject, bool allowInvalid, StoreLocation location,
123
/// <param name="listenOptions"> The <see cref="
ListenOptions
"/> to configure.</param>
125
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
126
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, X509Certificate2 serverCertificate)
139
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
142
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
143
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, X509Certificate2 serverCertificate,
159
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
161
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
162
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, Action<HttpsConnectionAdapterOptions> configureOptions)
189
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
191
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
192
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, HttpsConnectionAdapterOptions httpsOptions)
213
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
216
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
217
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state)
226
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
230
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
231
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state, TimeSpan handshakeTimeout)
245
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
247
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
248
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, TlsHandshakeCallbackOptions callbackOptions)
LocalhostListenOptions.cs (2)
35
var
v4Options = Clone(IPAddress.Loopback);
49
var
v6Options = Clone(IPAddress.IPv6Loopback);
Middleware\ListenOptionsConnectionLoggingExtensions.cs (6)
21
/// The <see cref="
ListenOptions
"/>.
23
public static
ListenOptions
UseConnectionLogging(this
ListenOptions
listenOptions)
32
/// The <see cref="
ListenOptions
"/>.
34
public static
ListenOptions
UseConnectionLogging(this
ListenOptions
listenOptions, string? loggerName)
Systemd\KestrelServerOptionsSystemdExtensions.cs (1)
37
public static KestrelServerOptions UseSystemd(this KestrelServerOptions options, Action<
ListenOptions
> configure)
TlsConfigurationLoader.cs (4)
88
/// Calls an appropriate overload of <see cref="Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(
ListenOptions
)"/>
91
/// <returns>Updated <see cref="
ListenOptions
"/> for convenient chaining.</returns>
92
public
ListenOptions
UseHttpsWithSni(
93
ListenOptions
listenOptions,
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (21)
AddressBinderTests.cs (12)
18
private readonly Func<
ListenOptions
,
ListenOptions
> _noopUseHttps = l => l;
56
var
listenOptions = AddressBinder.ParseAddress($"http://{host}", out var https);
67
var
listenOptions = AddressBinder.ParseAddress("http://localhost", out var https);
80
var
listenOptions = AddressBinder.ParseAddress("http://pipe:8080", out var https);
90
var
listenOptions = AddressBinder.ParseAddress(address, out var https);
101
var
listenOptions = AddressBinder.ParseAddress(address, out var https);
112
var
listenOptions = AddressBinder.ParseAddress(address, out var https);
123
var
listenOptions = AddressBinder.ParseAddress("http://unix:/tmp/kestrel-test.sock", out var https);
134
var
listenOptions = AddressBinder.ParseAddress(@"http://unix:/c:/foo/bar/pipe.socket", out var https);
148
var
listenOptions = AddressBinder.ParseAddress(address, out var https);
300
var endpoints = new List<
ListenOptions
>();
KestrelServerOptionsTests.cs (1)
31
Assert.Equal(
ListenOptions
.DefaultHttpProtocols, options.CodeBackedListenOptions[0].Protocols);
ListenOptionsTests.cs (6)
18
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
19
Assert.Equal(
ListenOptions
.DefaultHttpProtocols, listenOptions.Protocols);
38
var
clone = localhostListenOptions.Clone(IPAddress.IPv6Loopback);
56
var
clone1 = localhostListenOptions.Clone(IPAddress.IPv6Loopback);
63
var
clone2 = localhostListenOptions.Clone(IPAddress.IPv6Loopback);
71
var
listenOptions = new ListenOptions(new UriEndPoint(new Uri("http://127.0.0.1:5555")));
src\Servers\Kestrel\shared\test\TestContextFactory.cs (2)
111
Func<
ListenOptions
, Task> createBinding)
126
Func<
ListenOptions
, CancellationToken, Task> createBinding)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Servers\Kestrel\shared\test\TestContextFactory.cs (2)
111
Func<
ListenOptions
, Task> createBinding)
126
Func<
ListenOptions
, CancellationToken, Task> createBinding)
Microsoft.AspNetCore.Server.Kestrel.Tests (9)
KestrelConfigurationLoaderTests.cs (9)
405
var
listenOptions = Assert.Single(serverOptions.ConfigurationBackedListenOptions);
827
var
end1 = Assert.Single(endpointsToStart);
1121
Assert.Equal(
ListenOptions
.DefaultHttpProtocols, opt.Protocols);
1151
Assert.Equal(
ListenOptions
.DefaultHttpProtocols, opt.Protocols);
1158
Assert.Equal(
ListenOptions
.DefaultHttpProtocols, opt.Protocols);
1367
var
end1 = Assert.Single(endpointsToStart);
1527
var
stopEndpoint = Assert.Single(endpointsToStop);
1528
var
startEndpoint = Assert.Single(endpointsToStart);
1531
Assert.Equal(
ListenOptions
.DefaultHttpProtocols, stopEndpoint.Protocols);
Sockets.BindTests (4)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (4)
33
private
ListenOptions
_listenOptions;
46
public TestServer(RequestDelegate app, TestServiceContext context,
ListenOptions
listenOptions)
51
public TestServer(RequestDelegate app, TestServiceContext context, Action<
ListenOptions
> configureListenOptions, Action<IServiceCollection> configureServices = null)
54
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
Sockets.FunctionalTests (19)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (4)
33
private
ListenOptions
_listenOptions;
46
public TestServer(RequestDelegate app, TestServiceContext context,
ListenOptions
listenOptions)
51
public TestServer(RequestDelegate app, TestServiceContext context, Action<
ListenOptions
> configureListenOptions, Action<IServiceCollection> configureServices = null)
54
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
src\Servers\Kestrel\test\FunctionalTests\ConnectionMiddlewareTests.cs (2)
21
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
51
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (2)
49
public static Dictionary<string, Func<
ListenOptions
>> ConnectionMiddlewareData { get; } = new Dictionary<string, Func<
ListenOptions
>>
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (11)
36
public static TheoryData<
ListenOptions
> ConnectionMiddlewareData => new TheoryData<
ListenOptions
>
148
public async Task WriteAfterConnectionCloseNoops(
ListenOptions
listenOptions)
191
public async Task ThrowsOnWriteWithRequestAbortedTokenAfterRequestIsAborted(
ListenOptions
listenOptions)
261
public async Task WritingToConnectionAfterUnobservedCloseTriggersRequestAbortedToken(
ListenOptions
listenOptions)
352
public async Task AppCanHandleClientAbortingConnectionMidResponse(
ListenOptions
listenOptions)
423
public async Task ClientAbortingConnectionImmediatelyIsNotLoggedHigherThanDebug(
ListenOptions
listenOptions)
655
void ConfigureListenOptions(
ListenOptions
listenOptions)
877
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
954
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
1041
var
listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));