KestrelServerOptions.ListenLocalhost 方法

定义

重载

ListenLocalhost(Int32)

使用给定端口侦听 ::1 和 127.0.0.1。 这种类型的终结点不支持通过指定 0 来请求动态端口。

ListenLocalhost(Int32, Action<ListenOptions>)

使用给定端口侦听 ::1 和 127.0.0.1。 这种类型的终结点不支持通过指定 0 来请求动态端口。

ListenLocalhost(Int32)

使用给定端口侦听 ::1 和 127.0.0.1。 这种类型的终结点不支持通过指定 0 来请求动态端口。

public:
 void ListenLocalhost(int port);
public void ListenLocalhost (int port);
member this.ListenLocalhost : int -> unit
Public Sub ListenLocalhost (port As Integer)

参数

port
Int32

适用于

ListenLocalhost(Int32, Action<ListenOptions>)

使用给定端口侦听 ::1 和 127.0.0.1。 这种类型的终结点不支持通过指定 0 来请求动态端口。

public:
 void ListenLocalhost(int port, Action<Microsoft::AspNetCore::Server::Kestrel::Core::ListenOptions ^> ^ configure);
public void ListenLocalhost (int port, Action<Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions> configure);
member this.ListenLocalhost : int * Action<Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions> -> unit
Public Sub ListenLocalhost (port As Integer, configure As Action(Of ListenOptions))

参数

port
Int32
configure
Action<ListenOptions>

适用于