共用方式為


HttpConnection 類別

定義

用來使用 HTTP 型傳輸對 ASP.NET Core ConnectionHandler 進行連線。

public ref class HttpConnection : Microsoft::AspNetCore::Connections::ConnectionContext, Microsoft::AspNetCore::Connections::Features::IConnectionInherentKeepAliveFeature
public class HttpConnection : Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.Features.IConnectionInherentKeepAliveFeature
type HttpConnection = class
    inherit ConnectionContext
    interface IConnectionInherentKeepAliveFeature
Public Class HttpConnection
Inherits ConnectionContext
Implements IConnectionInherentKeepAliveFeature
繼承
HttpConnection
繼承
實作

建構函式

HttpConnection(HttpConnectionOptions, ILoggerFactory)

初始化 HttpConnection 類別的新執行個體。

HttpConnection(Uri)

初始化 HttpConnection 類別的新執行個體。

HttpConnection(Uri, HttpTransportType)

初始化 HttpConnection 類別的新執行個體。

HttpConnection(Uri, HttpTransportType, ILoggerFactory)

初始化 HttpConnection 類別的新執行個體。

屬性

ConnectionClosed

關閉用戶端連線時觸發。

(繼承來源 ConnectionContext)
ConnectionId

取得或設定連接識別碼。

Features

取得這個連接上可用的伺服器和中介軟體所提供的功能集合。

Items

取得或設定索引鍵/值集合,可用來共用此連接範圍內的資料。

LocalEndPoint

取得或設定這個連接的本機端點。

(繼承來源 ConnectionContext)
RemoteEndPoint

取得或設定這個連接的遠端端點。

(繼承來源 ConnectionContext)
Transport

取得或設定 IDuplexPipe ,可用來讀取或寫入此連接上的資料。

方法

Abort()

中止基礎連線。

(繼承來源 ConnectionContext)
Abort(ConnectionAbortedException)

中止基礎連線。

(繼承來源 ConnectionContext)
DisposeAsync()

處置連接。

StartAsync(CancellationToken)

啟動連線。

StartAsync(TransferFormat, CancellationToken)

使用指定的傳輸格式啟動連接。

明確介面實作

IConnectionInherentKeepAliveFeature.HasInherentKeepAlive

取得連接是否具有固有的 Keep-alive 概念。

擴充方法

GetHttpContext(ConnectionContext)

HttpContext如果有連接,則取得與連接相關聯的 。

適用於