Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ConnectionContext Class

Definition

Namespace:
Microsoft.AspNetCore.Connections
Assembly:
Microsoft.AspNetCore.Connections.Abstractions.dll
Package:
Microsoft.AspNetCore.Connections.Abstractions v10.0.0
Package:
Microsoft.AspNetCore.Connections.Abstractions v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.Connections.Abstractions v2.1.0
Package:
Microsoft.AspNetCore.Connections.Abstractions v2.2.0
Package:
Microsoft.AspNetCore.Connections.Abstractions v3.0.3
Package:
Microsoft.AspNetCore.Connections.Abstractions v3.1.18
Package:
Microsoft.AspNetCore.Connections.Abstractions v5.0.9
Package:
Microsoft.AspNetCore.Connections.Abstractions v6.0.6
Package:
Microsoft.AspNetCore.Connections.Abstractions v7.0.5
Package:
Microsoft.AspNetCore.Connections.Abstractions v8.0.19
Package:
Microsoft.AspNetCore.Connections.Abstractions v9.0.8
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs
Source:
ConnectionContext.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Encapsulates all information about an individual connection.

public ref class ConnectionContext abstract
public ref class ConnectionContext abstract : IAsyncDisposable
public ref class ConnectionContext abstract : Microsoft::AspNetCore::Connections::BaseConnectionContext, IAsyncDisposable
public abstract class ConnectionContext : Microsoft.AspNetCore.Connections.BaseConnectionContext, IAsyncDisposable
public abstract class ConnectionContext
public abstract class ConnectionContext : IAsyncDisposable
type ConnectionContext = class
 inherit BaseConnectionContext
 interface IAsyncDisposable
type ConnectionContext = class
type ConnectionContext = class
 interface IAsyncDisposable
Public MustInherit Class ConnectionContext
Inherits BaseConnectionContext
Implements IAsyncDisposable
Public MustInherit Class ConnectionContext
Public MustInherit Class ConnectionContext
Implements IAsyncDisposable
Inheritance
ConnectionContext
Inheritance
ConnectionContext
Derived
Implements

Constructors

Name Description
ConnectionContext()

Properties

Name Description
ConnectionClosed

Triggered when the client connection is closed.

ConnectionClosed

Triggered when the client connection is closed.

(Inherited from BaseConnectionContext)
ConnectionId

Gets or sets a unique identifier to represent this connection in trace logs.

ConnectionId

Gets or sets a unique identifier to represent this connection in trace logs.

(Inherited from BaseConnectionContext)
Features

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

Features

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

(Inherited from BaseConnectionContext)
Items

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

Items

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

(Inherited from BaseConnectionContext)
LocalEndPoint

Gets or sets the local endpoint for this connection.

LocalEndPoint

Gets or sets the local endpoint for this connection.

(Inherited from BaseConnectionContext)
RemoteEndPoint

Gets or sets the remote endpoint for this connection.

RemoteEndPoint

Gets or sets the remote endpoint for this connection.

(Inherited from BaseConnectionContext)
Transport

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

Methods

Name Description
Abort()

Aborts the underlying connection.

Abort(ConnectionAbortedException)

Aborts the underlying connection.

DisposeAsync()

Releases resources for the underlying connection.

DisposeAsync()

Releases resources for the underlying connection.

(Inherited from BaseConnectionContext)

Extension Methods

Name Description
GetHttpContext(ConnectionContext)

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

Applies to


Feedback

Was this page helpful?