ListenOptions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Describes either an IPEndPoint, Unix domain socket path, named pipe name, or a file descriptor for an already open socket that Kestrel should bind to or open.
public ref class ListenOptions : Microsoft::AspNetCore::Server::Kestrel::Transport::Abstractions::Internal::IEndPointInformation
public ref class ListenOptions : Microsoft::AspNetCore::Connections::IConnectionBuilder, Microsoft::AspNetCore::Server::Kestrel::Transport::Abstractions::Internal::IEndPointInformation
public ref class ListenOptions : Microsoft::AspNetCore::Connections::IConnectionBuilder
public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder, Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder
public class ListenOptions : Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation
public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation
public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder
type ListenOptions = class
interface IConnectionBuilder
interface IMultiplexedConnectionBuilder
type ListenOptions = class
interface IEndPointInformation
type ListenOptions = class
interface IEndPointInformation
interface IConnectionBuilder
type ListenOptions = class
interface IConnectionBuilder
Public Class ListenOptions
Implements IConnectionBuilder, IMultiplexedConnectionBuilder
Public Class ListenOptions
Implements IEndPointInformation
Public Class ListenOptions
Implements IConnectionBuilder, IEndPointInformation
Public Class ListenOptions
Implements IConnectionBuilder
- Inheritance
-
ListenOptions
- Implements
-
IConnectionBuilder IMultiplexedConnectionBuilder Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation
Properties
| Name | Description |
|---|---|
| ApplicationServices |
Gets the application IServiceProvider. |
| ConnectionAdapters |
Gets the List<T> that allows each connection Stream
to be intercepted and transformed.
Configured by the |
| DisableAltSvcHeader |
Gets or sets a value that controls whether the "Alt-Svc" header is included with response headers. The "Alt-Svc" header is used by clients to upgrade HTTP/1.1 and HTTP/2 connections to HTTP/3. The "Alt-Svc" header is automatically included with a response if Protocols has either HTTP/1.1 or HTTP/2 enabled, and HTTP/3 is enabled. If an "Alt-Svc" header value has already been set by the app then it isn't changed. |
| EndPoint |
Gets the EndPoint. |
| FileHandle |
Gets the bound file descriptor to a socket. |
| HandleType | |
| IPEndPoint |
Gets the bound IPEndPoint. |
| KestrelServerOptions |
Gets the KestrelServerOptions for the listener options. Enables connection middleware to resolve and use services registered by the application during startup. |
| NoDelay |
Set to false to enable Nagle's algorithm for all connections. |
| PipeName |
Gets the bound pipe name to a name pipe server. |
| Protocols |
The protocols enabled on this endpoint. |
| SocketPath |
Gets the bound absolute path to a Unix domain socket. |
| Type |
The type of interface being described: either an IPEndPoint, Unix domain socket path, or a file descriptor. |
Methods
| Name | Description |
|---|---|
| Build() |
Builds the ConnectionDelegate. |
| Clone(IPAddress) |
used for cloning to two IPEndpoints |
| ToString() | Returns a string that represents the current object. |
| Use(Func<ConnectionDelegate,ConnectionDelegate>) |
Adds a middleware delegate to the connection pipeline.
Configured by the |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IMultiplexedConnectionBuilder.Build() | |
| IMultiplexedConnectionBuilder.Use(Func<MultiplexedConnectionDelegate,MultiplexedConnectionDelegate>) | |
Extension Methods
| Name | Description |
|---|---|
| Run(IConnectionBuilder, Func<ConnectionContext,Task>) |
Add the given |
| Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) |
Add the given |
| Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>) |
Add the given Prefer using Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) for better performance as shown below:
|
| UseConnectionHandler<TConnectionHandler>(IConnectionBuilder) |
Use the given |
| UseConnectionLogging(ListenOptions, String) |
Emits verbose logs for bytes read from and written to the connection. |
| UseConnectionLogging(ListenOptions) |
Emits verbose logs for bytes read from and written to the connection. |
| UseConnectionTimeout(ListenOptions) |
Add the connection timeout middleware. |
| UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, HttpsConnectionAdapterOptions) |
Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>). |
| UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object, TimeSpan) |
Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>). |
| UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object) |
Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>). |
| UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation, Action<HttpsConnectionAdapterOptions>) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, StoreName, String, Boolean) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, StoreName, String) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, String, String, Action<HttpsConnectionAdapterOptions>) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, String, String) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, String) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, TlsHandshakeCallbackOptions) |
Configure Kestrel to use HTTPS. This does not use default certificates or other defaults specified via config or ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>). |
| UseHttps(ListenOptions, X509Certificate2, Action<HttpsConnectionAdapterOptions>) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions, X509Certificate2) |
Configure Kestrel to use HTTPS. |
| UseHttps(ListenOptions) |
Configure Kestrel to use HTTPS with the default certificate if available. This will throw if no default certificate is configured. |
| UseHub<THub>(IConnectionBuilder) |
Configure the connection to host the specified Hub type. |
| UseTlsClientHelloListener(ListenOptions, Action<ConnectionContext,ReadOnlySequence<Byte>>, Nullable<TimeSpan>) |
Adds a connection middleware that sniffs the TLS Client Hello message and invokes |