WebHostBuilderSocketExtensions.UseSockets 方法

定义

重载

UseSockets(IWebHostBuilder)

将套接字指定为 Kestrel 要使用的传输。

UseSockets(IWebHostBuilder, Action<SocketTransportOptions>)

将套接字指定为 Kestrel 要使用的传输。

UseSockets(IWebHostBuilder)

Source:
WebHostBuilderSocketExtensions.cs
Source:
WebHostBuilderSocketExtensions.cs
Source:
WebHostBuilderSocketExtensions.cs

将套接字指定为 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>)

Source:
WebHostBuilderSocketExtensions.cs
Source:
WebHostBuilderSocketExtensions.cs
Source:
WebHostBuilderSocketExtensions.cs

将套接字指定为 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。

适用于