2 types derived from ListenOptions
Microsoft.AspNetCore.Server.Kestrel.Core (2)
AnyIPListenOptions.cs (1)
12
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)
527
var listenOptions = new
ListenOptions
(endPoint);
593
var listenOptions = new
ListenOptions
(socketPath);
615
var listenOptions = new
ListenOptions
(handle);
638
var listenOptions = new
ListenOptions
(new NamedPipeEndPoint(pipeName));
ListenOptions.cs (1)
236
var options = new
ListenOptions
(new IPEndPoint(address, IPEndPoint!.Port))
194 references to ListenOptions
Aspire.Dashboard (1)
Authentication\Connection\ListenOptionsConnectionTypeExtensions.cs (1)
10
public static void UseConnectionTypes(this
ListenOptions
listenOptions, IEnumerable<ConnectionType> connectionTypes)
Aspire.Dashboard.Tests (1)
Integration\DashboardClientAuthTests.cs (1)
94
void ConfigureListen(
ListenOptions
options)
Aspire.Hosting (1)
Dashboard\DashboardServiceHost.cs (1)
164
void ConfigureListen(
ListenOptions
options)
Microsoft.AspNetCore.Server.Kestrel.Core (191)
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;
177
var
httpDefault = ParseAddress(Constants.DefaultServerAddress, out _);
190
public OverrideWithAddressesStrategy(IReadOnlyCollection<string> addresses, Func<
ListenOptions
,
ListenOptions
> useHttps)
211
public OverrideWithEndpointsStrategy(IReadOnlyCollection<
ListenOptions
> endpoints, string[] originalAddresses)
230
private readonly IReadOnlyCollection<
ListenOptions
> _endpoints;
232
public EndpointsStrategy(IReadOnlyCollection<
ListenOptions
> endpoints)
239
foreach (
var
endpoint in _endpoints)
249
private readonly Func<
ListenOptions
,
ListenOptions
> _useHttps;
251
public AddressesStrategy(IReadOnlyCollection<string> addresses, Func<
ListenOptions
,
ListenOptions
> useHttps)
261
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)
64
public async Task<EndPoint> BindAsync(EndPoint endPoint, MultiplexedConnectionDelegate multiplexedConnectionDelegate,
ListenOptions
listenOptions, CancellationToken cancellationToken)
Internal\KestrelServerImpl.cs (4)
139
async Task OnBind(
ListenOptions
options, CancellationToken onBindCancellationToken)
367
foreach (
var
lo in endpointsToStop)
373
foreach (
var
listenOption in endpointsToStop)
388
foreach (
var
listenOption in endpointsToStart)
KestrelConfigurationLoader.cs (17)
101
public KestrelConfigurationLoader Endpoint(IPAddress address, int port, Action<
ListenOptions
> configure)
116
public KestrelConfigurationLoader Endpoint(IPEndPoint endPoint, Action<
ListenOptions
> configure)
139
public KestrelConfigurationLoader LocalhostEndpoint(int port, Action<
ListenOptions
> configure)
159
public KestrelConfigurationLoader AnyIPEndpoint(int port, Action<
ListenOptions
> configure)
179
public KestrelConfigurationLoader UnixSocketEndpoint(string socketPath, Action<
ListenOptions
> configure)
204
public KestrelConfigurationLoader NamedPipeEndpoint(string pipeName, Action<
ListenOptions
> configure)
225
public KestrelConfigurationLoader HandleEndpoint(ulong handle, Action<
ListenOptions
> configure)
239
internal void ApplyEndpointDefaults(
ListenOptions
listenOptions)
335
internal (List<
ListenOptions
>, List<
ListenOptions
>) Reload()
343
var endpointsToStart = new List<
ListenOptions
>();
344
var endpointsToReuse = new List<
ListenOptions
>();
363
var
listenOptions = AddressBinder.ParseAddress(endpoint.Url, out var https);
394
var matchingBoundEndpoints = new List<
ListenOptions
>();
395
foreach (
var
o in endpointsToStop)
457
foreach (
var
endpointToStart in endpointsToStart)
481
foreach (
var
endpointToStop in endpointsToStop)
KestrelServer.cs (5)
89
public void PopulateMultiplexedTransportFeatures(FeatureCollection features,
ListenOptions
listenOptions)
94
public
ListenOptions
UseHttpsWithDefaults(
ListenOptions
listenOptions)
109
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)
364
writer.WritePropertyName(nameof(
ListenOptions
));
366
foreach (
var
listenOptions in OptionsInUse)
485
public void Listen(IPAddress address, int port, Action<
ListenOptions
> configure)
513
public void Listen(IPEndPoint endPoint, Action<
ListenOptions
> configure)
522
public void Listen(EndPoint endPoint, Action<
ListenOptions
> configure)
527
var
listenOptions = new ListenOptions(endPoint);
543
public void ListenLocalhost(int port, Action<
ListenOptions
> configure)
561
public void ListenAnyIP(int port, Action<
ListenOptions
> configure)
583
public void ListenUnixSocket(string socketPath, Action<
ListenOptions
> configure)
593
var
listenOptions = new ListenOptions(socketPath);
611
public void ListenHandle(ulong handle, Action<
ListenOptions
> configure)
615
var
listenOptions = new ListenOptions(handle);
633
public void ListenNamedPipe(string pipeName, Action<
ListenOptions
> configure)
638
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 (65)
21
/// Extension methods for <see cref="
ListenOptions
"/> that configure Kestrel to use HTTPS for a given endpoint.
29
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
30
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
31
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions) => listenOptions.UseHttps(_ => { });
36
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
39
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
40
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, string fileName)
49
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
53
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
54
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, string fileName, string? password)
63
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
67
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
68
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, string fileName, string? password,
78
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
81
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
82
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject)
88
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
92
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
93
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject, bool allowInvalid)
99
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
104
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
105
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject, bool allowInvalid, StoreLocation location)
111
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
117
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
118
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, StoreName storeName, string subject, bool allowInvalid, StoreLocation location,
127
/// <param name="listenOptions"> The <see cref="
ListenOptions
"/> to configure.</param>
129
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
130
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, X509Certificate2 serverCertificate)
143
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
146
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
147
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, X509Certificate2 serverCertificate,
163
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
165
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
166
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, Action<HttpsConnectionAdapterOptions> configureOptions)
193
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
195
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
196
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, HttpsConnectionAdapterOptions httpsOptions)
217
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
220
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
221
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state)
230
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
234
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
235
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state, TimeSpan handshakeTimeout)
249
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
251
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
252
public static
ListenOptions
UseHttps(this
ListenOptions
listenOptions, TlsHandshakeCallbackOptions callbackOptions)
289
/// <param name="listenOptions">The <see cref="
ListenOptions
"/> to configure.</param>
303
/// <returns>The <see cref="
ListenOptions
"/>.</returns>
304
public static
ListenOptions
UseTlsClientHelloListener(this
ListenOptions
listenOptions, Action<ConnectionContext, ReadOnlySequence<byte>> tlsClientHelloBytesCallback, TimeSpan? timeout = null)
LocalhostListenOptions.cs (2)
44
var
v4Options = Clone(IPAddress.Loopback);
58
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,