Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Add IConnectionLifetimeFeature to Microsoft.AspNetCore.Connections.Abstractions #2054

Closed
davidfowl opened this issue Sep 8, 2017 · 7 comments
Assignees
Labels
Bedrock cost: 0 Will take no time. This is a tracking issue

Comments

@davidfowl
Copy link
Member

davidfowl commented Sep 8, 2017

public interface IConnectionLifetimeFeature
{
    CancellationToken ConnectionClosed { get; }
    void Abort();
}

These should also be exposed on ConnectionContext

Related to: #1980

@muratg muratg added this to the 2.2.0 milestone Jan 11, 2018
@muratg
Copy link
Contributor

muratg commented Jan 11, 2018

Putting this in 2.2 milestone for now (like the other bedrock items).

@davidfowl davidfowl changed the title Add IConnectionLifetimeFeature to Protocols.Abstractions Add IConnectionLifetimeFeature to Microsoft.AspNetCore.Connections.Abstractions Mar 25, 2018
@KPixel
Copy link

KPixel commented Mar 29, 2018

I don't think that Abort should be exposed directly on ConnectionContext.

As it is, ConnectionContext has a very clean API: The Transport which is the core reason why this type exists and two extensibility properties (Features and Items).

Anything else would feel too specific.
(I can give a pass to ConnectionId because it is a simple property and it is useful for logging.)

By the way, should Abort be async-capable?

@davidfowl
Copy link
Member Author

I don't think that Abort should be exposed directly on ConnectionContext.

I think it needs to be. It's way to directly communicate with the underlying transport skipping all indirections (the Transport pipe might have been replaced).

By the way, should Abort be async-capable?

I don't think so. It's a signal, fire and forget.

I updated the interface.

@KPixel
Copy link

KPixel commented Mar 29, 2018

This interface will be available through the Features property. And that's what that property is there for.

I just don't understand why it also needs to be "hard-coded" into ConnectionContext.

@davidfowl
Copy link
Member Author

Because every connection needs the ability to be aborted and that is a distinct feature from completing the transport.

@halter73 halter73 modified the milestones: 2.2.0, 2.1.0-rc1 Apr 11, 2018
@halter73 halter73 self-assigned this Apr 11, 2018
@halter73 halter73 added cost: M Will take 3 - 5 days to complete cost: 0 Will take no time. This is a tracking issue and removed cost: M Will take 3 - 5 days to complete labels Apr 11, 2018
@halter73 halter73 added blocked Blocked and removed 3 - Done labels Apr 24, 2018
@halter73 halter73 reopened this Apr 24, 2018
@muratg muratg modified the milestones: 2.1.0-rc1, 2.2.0 Apr 24, 2018
@muratg
Copy link
Contributor

muratg commented Apr 24, 2018

Tracking the dev work.

@muratg muratg added the Bedrock label May 1, 2018
@halter73
Copy link
Member

This is now in 2.1 and our dev branches.

@halter73 halter73 removed the blocked Blocked label May 30, 2018
@Tratcher Tratcher modified the milestones: 2.2.0, 2.2.0-preview1 Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bedrock cost: 0 Will take no time. This is a tracking issue
Projects
None yet
Development

No branches or pull requests

5 participants