KestrelServerOptions.Listen 方法

定义

重载

Listen(IPEndPoint, Action<ListenOptions>)

绑定到给定的 IP 地址和端口。 回调配置特定于终结点的设置。

Listen(IPAddress, Int32, Action<ListenOptions>)

绑定到给定的 IP 地址和端口。 回调配置特定于终结点的设置。

Listen(IPAddress, Int32)

绑定到给定的 IP 地址和端口。

Listen(EndPoint)

绑定到给定的终结点。

Listen(IPEndPoint)

绑定到给定的 IP 终结点。

Listen(EndPoint, Action<ListenOptions>)

绑定到给定的终结点。 回调配置特定于终结点的设置。

Listen(IPEndPoint, Action<ListenOptions>)

Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs

绑定到给定的 IP 地址和端口。 回调配置特定于终结点的设置。

C#
public void Listen (System.Net.IPEndPoint endPoint, Action<Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions> configure);

参数

endPoint
IPEndPoint
configure
Action<ListenOptions>

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

Listen(IPAddress, Int32, Action<ListenOptions>)

Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs

绑定到给定的 IP 地址和端口。 回调配置特定于终结点的设置。

C#
public void Listen (System.Net.IPAddress address, int port, Action<Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions> configure);

参数

address
IPAddress
port
Int32
configure
Action<ListenOptions>

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

Listen(IPAddress, Int32)

Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs

绑定到给定的 IP 地址和端口。

C#
public void Listen (System.Net.IPAddress address, int port);

参数

address
IPAddress
port
Int32

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

Listen(EndPoint)

Source:
KestrelServerOptions.cs

绑定到给定的终结点。

C#
public void Listen (System.Net.EndPoint endPoint);

参数

endPoint
EndPoint

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 5.0, 6.0, 7.0, 8.0, 9.0

Listen(IPEndPoint)

Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs
Source:
KestrelServerOptions.cs

绑定到给定的 IP 终结点。

C#
public void Listen (System.Net.IPEndPoint endPoint);

参数

endPoint
IPEndPoint

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

Listen(EndPoint, Action<ListenOptions>)

Source:
KestrelServerOptions.cs

绑定到给定的终结点。 回调配置特定于终结点的设置。

C#
public void Listen (System.Net.EndPoint endPoint, Action<Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions> configure);

参数

endPoint
EndPoint
configure
Action<ListenOptions>

适用于

ASP.NET Core 9.0 和其他版本
产品 版本
ASP.NET Core 5.0, 6.0, 7.0, 8.0, 9.0