diff options
Diffstat (limited to 'src/Servers/Connections.Abstractions/src/IConnectionListenerFactorySelector.cs')
-rw-r--r-- | src/Servers/Connections.Abstractions/src/IConnectionListenerFactorySelector.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Servers/Connections.Abstractions/src/IConnectionListenerFactorySelector.cs b/src/Servers/Connections.Abstractions/src/IConnectionListenerFactorySelector.cs new file mode 100644 index 0000000000..fc46c377d9 --- /dev/null +++ b/src/Servers/Connections.Abstractions/src/IConnectionListenerFactorySelector.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Net; + +namespace Microsoft.AspNetCore.Connections; + +/// <summary> +/// Defines an interface that determines whether the listener factory supports binding to the specified <see cref="EndPoint"/>. +/// </summary> +/// <remarks> +/// This interface should be implemented by <see cref="IConnectionListenerFactory"/> and <see cref="IMultiplexedConnectionListenerFactory"/> +/// types that want to control want endpoint instances they can bind to. +/// </remarks> +public interface IConnectionListenerFactorySelector +{ + /// <summary> + /// Returns a value that indicates whether the listener factory supports binding to the specified <see cref="EndPoint"/>. + /// </summary> + /// <param name="endpoint">The <see cref="EndPoint" /> to bind to.</param> + /// <returns>A value that indicates whether the listener factory supports binding to the specified <see cref="EndPoint"/>.</returns> + bool CanBind(EndPoint endpoint); +} |