HttpConnection Class

Definition

Used to make a connection to an ASP.NET Core ConnectionHandler using an HTTP-based transport.

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
Inheritance
HttpConnection
Inheritance
Implements

Constructors

HttpConnection(HttpConnectionOptions, ILoggerFactory)

Initializes a new instance of the HttpConnection class.

HttpConnection(Uri, HttpTransportType, ILoggerFactory)

Initializes a new instance of the HttpConnection class.

HttpConnection(Uri, HttpTransportType)

Initializes a new instance of the HttpConnection class.

HttpConnection(Uri)

Initializes a new instance of the HttpConnection class.

Properties

ConnectionClosed

Triggered when the client connection is closed.

(Inherited from ConnectionContext)
ConnectionId

Gets or sets the connection ID.

Features

Gets the collection of features provided by the server and middleware available on this connection.

Items

Gets or sets a key/value collection that can be used to share data within the scope of this connection.

LocalEndPoint

Gets or sets the local endpoint for this connection.

(Inherited from ConnectionContext)
RemoteEndPoint

Gets or sets the remote endpoint for this connection.

(Inherited from ConnectionContext)
Transport

Gets or sets the IDuplexPipe that can be used to read or write data on this connection.

Methods

Abort()

Aborts the underlying connection.

(Inherited from ConnectionContext)
Abort(ConnectionAbortedException)

Aborts the underlying connection.

(Inherited from ConnectionContext)
DisposeAsync()

Disposes the connection.

StartAsync(CancellationToken)

Starts the connection.

StartAsync(TransferFormat, CancellationToken)

Starts the connection using the specified transfer format.

Explicit Interface Implementations

IConnectionInherentKeepAliveFeature.HasInherentKeepAlive

Gets whether or not the connection has an inherent keep-alive concept.

Extension Methods

GetHttpContext(ConnectionContext)

Gets the HttpContext associated with the connection, if there is one.

Applies to