共用方式為


WebHostBuilderSocketExtensions.UseSockets 方法

定義

多載

UseSockets(IWebHostBuilder)

將 Sockets 指定為 Kestrel 要使用的傳輸。

UseSockets(IWebHostBuilder, Action<SocketTransportOptions>)

將 Sockets 指定為 Kestrel 要使用的傳輸。

UseSockets(IWebHostBuilder)

來源:
WebHostBuilderSocketExtensions.cs
來源:
WebHostBuilderSocketExtensions.cs
來源:
WebHostBuilderSocketExtensions.cs

將 Sockets 指定為 Kestrel 要使用的傳輸。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseSockets(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSockets (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder);
static member UseSockets : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseSockets (hostBuilder As IWebHostBuilder) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。

傳回

Microsoft.AspNetCore.Hosting.IWebHostBuilder。

適用於

UseSockets(IWebHostBuilder, Action<SocketTransportOptions>)

來源:
WebHostBuilderSocketExtensions.cs
來源:
WebHostBuilderSocketExtensions.cs
來源:
WebHostBuilderSocketExtensions.cs

將 Sockets 指定為 Kestrel 要使用的傳輸。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseSockets(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Server::Kestrel::Transport::Sockets::SocketTransportOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSockets (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions> configureOptions);
static member UseSockets : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseSockets (hostBuilder As IWebHostBuilder, configureOptions As Action(Of SocketTransportOptions)) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。

configureOptions
Action<SocketTransportOptions>

用來設定傳輸選項的回呼。

傳回

Microsoft.AspNetCore.Hosting.IWebHostBuilder。

適用於