Share via


DefaultConnectionContext Class

Definition

The default implementation for the ConnectionContext.

public ref class DefaultConnectionContext : Microsoft::AspNetCore::Connections::ConnectionContext, IDisposable, Microsoft::AspNetCore::Connections::Features::IConnectionIdFeature, Microsoft::AspNetCore::Connections::Features::IConnectionItemsFeature, Microsoft::AspNetCore::Connections::Features::IConnectionLifetimeFeature, Microsoft::AspNetCore::Connections::Features::IConnectionTransportFeature, Microsoft::AspNetCore::Connections::Features::IConnectionUserFeature
public ref class DefaultConnectionContext : Microsoft::AspNetCore::Connections::ConnectionContext, Microsoft::AspNetCore::Connections::Features::IConnectionEndPointFeature, Microsoft::AspNetCore::Connections::Features::IConnectionIdFeature, Microsoft::AspNetCore::Connections::Features::IConnectionItemsFeature, Microsoft::AspNetCore::Connections::Features::IConnectionLifetimeFeature, Microsoft::AspNetCore::Connections::Features::IConnectionTransportFeature, Microsoft::AspNetCore::Connections::Features::IConnectionUserFeature
public class DefaultConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext, IDisposable, Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature, Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature, Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature, Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature, Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature
public class DefaultConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.Features.IConnectionEndPointFeature, Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature, Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature, Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature, Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature, Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature
type DefaultConnectionContext = class
    inherit ConnectionContext
    interface IDisposable
    interface IConnectionIdFeature
    interface IConnectionItemsFeature
    interface IConnectionTransportFeature
    interface IConnectionUserFeature
    interface IConnectionLifetimeFeature
type DefaultConnectionContext = class
    inherit ConnectionContext
    interface IConnectionEndPointFeature
    interface IConnectionIdFeature
    interface IConnectionItemsFeature
    interface IConnectionLifetimeFeature
    interface IConnectionTransportFeature
    interface IConnectionUserFeature
type DefaultConnectionContext = class
    inherit ConnectionContext
    interface IConnectionIdFeature
    interface IConnectionItemsFeature
    interface IConnectionTransportFeature
    interface IConnectionUserFeature
    interface IConnectionLifetimeFeature
    interface IConnectionEndPointFeature
Public Class DefaultConnectionContext
Inherits ConnectionContext
Implements IConnectionIdFeature, IConnectionItemsFeature, IConnectionLifetimeFeature, IConnectionTransportFeature, IConnectionUserFeature, IDisposable
Public Class DefaultConnectionContext
Inherits ConnectionContext
Implements IConnectionEndPointFeature, IConnectionIdFeature, IConnectionItemsFeature, IConnectionLifetimeFeature, IConnectionTransportFeature, IConnectionUserFeature
Inheritance
DefaultConnectionContext
Inheritance
Implements

Constructors

DefaultConnectionContext()

Creates the DefaultConnectionContext without Pipes to avoid upfront allocations. The caller is expected to set the Transport and Application pipes manually.

DefaultConnectionContext(String, IDuplexPipe, IDuplexPipe)

Creates the DefaultConnectionContext with the given transport and application pipes.

DefaultConnectionContext(String)

Creates the DefaultConnectionContext without Pipes to avoid upfront allocations. The caller is expected to set the Transport and Application pipes manually.

Properties

Application System.Object.Application
ConnectionClosed

Gets or sets the CancellationToken that is triggered when the connection is closed.

ConnectionId

Gets or sets the connection identifier.

Features

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

Items

Gets or sets the items associated with the connection.

LocalEndPoint

Gets or sets the local EndPoint.

LocalEndPoint

Gets or sets the local endpoint for this connection.

(Inherited from ConnectionContext)
RemoteEndPoint

Gets or sets the remote EndPoint.

RemoteEndPoint

Gets or sets the remote endpoint for this connection.

(Inherited from ConnectionContext)
Transport

Gets or sets the transport for the connection.

User

Gets or sets the user associated with the connection.

Methods

Abort()
Abort()

Aborts the underlying connection.

(Inherited from ConnectionContext)
Abort(ConnectionAbortedException)

Aborts the underlying connection.

Abort(ConnectionAbortedException)

Aborts the underlying connection.

(Inherited from ConnectionContext)
Dispose()
DisposeAsync()

Releases resources for the underlying connection.

DisposeAsync()

Releases resources for the underlying connection.

(Inherited from ConnectionContext)

Extension Methods

GetHttpContext(ConnectionContext)

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

Applies to