ListenOptions ListenOptions ListenOptions Class

Definition

Describes either an IPEndPoint, Unix domain socket path, or a file descriptor for an already open socket that Kestrel should bind to or open.

public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation
type ListenOptions = class
    interface IEndPointInformation
    interface IConnectionBuilder
Public Class ListenOptions
Implements IConnectionBuilder, IEndPointInformation
Inheritance
ListenOptionsListenOptionsListenOptions
Implements

Properties

ApplicationServices ApplicationServices ApplicationServices
ConnectionAdapters ConnectionAdapters ConnectionAdapters

Gets the List<T> that allows each connection Stream to be intercepted and transformed. Configured by the UseHttps() and UseConnectionLogging(ListenOptions) extension methods.

FileHandle FileHandle FileHandle

A file descriptor for the socket to open. Only set if the ListenOptionsType is FileHandle.

HandleType HandleType HandleType
IPEndPoint IPEndPoint IPEndPoint

The IPEndPoint to bind to. Only set if the ListenOptionsType is IPEndPoint.

KestrelServerOptions KestrelServerOptions KestrelServerOptions

Enables an IConnectionAdapter to resolve and use services registered by the application during startup. Only set if accessed from the callback of a KestrelServerOptions Listen* method.

NoDelay NoDelay NoDelay

Set to false to enable Nagle's algorithm for all connections.

Protocols Protocols Protocols

The protocols enabled on this endpoint.

SocketPath SocketPath SocketPath

The absolute path to a Unix domain socket to bind to. Only set if the ListenOptionsType is SocketPath.

Type Type Type

The type of interface being described: either an IPEndPoint, Unix domain socket path, or a file descriptor.

Methods

Build() Build() Build()
ToString() ToString() ToString()
Use(Func<ConnectionDelegate,ConnectionDelegate>) Use(Func<ConnectionDelegate,ConnectionDelegate>) Use(Func<ConnectionDelegate,ConnectionDelegate>)

Extension Methods

Run(IConnectionBuilder, Func<ConnectionContext,Task>) Run(IConnectionBuilder, Func<ConnectionContext,Task>) Run(IConnectionBuilder, Func<ConnectionContext,Task>)
Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>) Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>) Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>)
UseConnectionHandler<TConnectionHandler>(IConnectionBuilder) UseConnectionHandler<TConnectionHandler>(IConnectionBuilder) UseConnectionHandler<TConnectionHandler>(IConnectionBuilder)
UseConnectionLogging(ListenOptions) UseConnectionLogging(ListenOptions) UseConnectionLogging(ListenOptions)

Emits verbose logs for bytes read from and written to the connection.

UseConnectionLogging(ListenOptions, String) UseConnectionLogging(ListenOptions, String) UseConnectionLogging(ListenOptions, String)

Emits verbose logs for bytes read from and written to the connection.

UseHttps(ListenOptions) UseHttps(ListenOptions) UseHttps(ListenOptions)

Configure Kestrel to use HTTPS with the default certificate if available. This will throw if no default certificate is configured.

UseHttps(ListenOptions, HttpsConnectionAdapterOptions) UseHttps(ListenOptions, HttpsConnectionAdapterOptions) UseHttps(ListenOptions, HttpsConnectionAdapterOptions)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, StoreName, String) UseHttps(ListenOptions, StoreName, String) UseHttps(ListenOptions, StoreName, String)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, StoreName, String, Boolean) UseHttps(ListenOptions, StoreName, String, Boolean) UseHttps(ListenOptions, StoreName, String, Boolean)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation) UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation) UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, X509Certificate2) UseHttps(ListenOptions, X509Certificate2) UseHttps(ListenOptions, X509Certificate2)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, X509Certificate2, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, X509Certificate2, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, X509Certificate2, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, String) UseHttps(ListenOptions, String) UseHttps(ListenOptions, String)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, String, String) UseHttps(ListenOptions, String, String) UseHttps(ListenOptions, String, String)

Configure Kestrel to use HTTPS.

UseHttps(ListenOptions, String, String, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, String, String, Action<HttpsConnectionAdapterOptions>) UseHttps(ListenOptions, String, String, Action<HttpsConnectionAdapterOptions>)

Configure Kestrel to use HTTPS.

UseHttpServer<TContext>(IConnectionBuilder, ServiceContext, IHttpApplication<TContext>, HttpProtocols) UseHttpServer<TContext>(IConnectionBuilder, ServiceContext, IHttpApplication<TContext>, HttpProtocols) UseHttpServer<TContext>(IConnectionBuilder, ServiceContext, IHttpApplication<TContext>, HttpProtocols)
UseHttpServer<TContext>(IConnectionBuilder, IList<IConnectionAdapter>, ServiceContext, IHttpApplication<TContext>, HttpProtocols) UseHttpServer<TContext>(IConnectionBuilder, IList<IConnectionAdapter>, ServiceContext, IHttpApplication<TContext>, HttpProtocols) UseHttpServer<TContext>(IConnectionBuilder, IList<IConnectionAdapter>, ServiceContext, IHttpApplication<TContext>, HttpProtocols)
UseHub<THub>(IConnectionBuilder) UseHub<THub>(IConnectionBuilder) UseHub<THub>(IConnectionBuilder)

Configure the connection to host the specified Hub type.

Applies to