KestrelServerOptions.ListenLocalhost 方法

定義

多載

ListenLocalhost(Int32)

使用指定的埠接聽 ::1 和 127.0.0.1。 此類型的端點不支援藉由指定 0 來要求動態埠。

ListenLocalhost(Int32, Action<ListenOptions>)

使用指定的埠接聽 ::1 和 127.0.0.1。 此類型的端點不支援藉由指定 0 來要求動態埠。

ListenLocalhost(Int32)

來源:
KestrelServerOptions.cs
來源:
KestrelServerOptions.cs

使用指定的埠接聽 ::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>)

來源:
KestrelServerOptions.cs
來源:
KestrelServerOptions.cs

使用指定的埠接聽 ::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>

適用於