HttpConnection.StartAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
StartAsync(CancellationToken) |
启动连接。 |
StartAsync(TransferFormat, CancellationToken) |
使用指定的传输格式启动连接。 |
StartAsync(CancellationToken)
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
启动连接。
public System.Threading.Tasks.Task StartAsync (System.Threading.CancellationToken cancellationToken = default);
member this.StartAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function StartAsync (Optional cancellationToken As CancellationToken = Nothing) As Task
参数
- cancellationToken
- CancellationToken
要监视取消请求的标记。 默认值是 None。
返回
一个 Task 表示异步开始的 。
注解
连接停止后无法重启。 若要重启连接,应使用相同的选项创建新实例。
适用于
StartAsync(TransferFormat, CancellationToken)
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
- Source:
- HttpConnection.cs
使用指定的传输格式启动连接。
public System.Threading.Tasks.Task StartAsync (Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default);
member this.StartAsync : Microsoft.AspNetCore.Connections.TransferFormat * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function StartAsync (transferFormat As TransferFormat, Optional cancellationToken As CancellationToken = Nothing) As Task
参数
- transferFormat
- TransferFormat
连接应使用的传输格式。
- cancellationToken
- CancellationToken
要监视取消请求的标记。 默认值是 None。
返回
一个 Task 表示异步开始的 。
注解
连接停止后无法重启。 若要重启连接,应使用相同的选项创建新实例。