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

Make IConnection single-use and move restart/reuse behavior to HubConnection #1450

Closed
analogrelay opened this issue Feb 15, 2018 · 3 comments
Assignees

Comments

@analogrelay
Copy link
Contributor

It makes things a little cleaner and after all, the main reason we want restartable/reusable connections are to keep HubConnection bindings in place, so making HttpConnection/IConnection restartable is less important.

@davidfowl
Copy link
Member

davidfowl commented Feb 15, 2018

So thinking about this more in the context of my existing change, we might be able to just unify things like this:

ConnectionContext is the root of the universe, its used on both the client and the server as the connection abstraction. We remove IConnection completely and introduce a factory of some sort that looks something like this:

public interface IConnectionFactory
{
    public ValueTask<ConnectionContext> ConnectAsync();
}

We then turn the HttpConnection into the HttpConnectionFactory whose solve purpose is to provide the ConnectionContext implementation over the various http transports.

I'll work through it.

@davidfowl
Copy link
Member

Closing in favor of #1450

@davidfowl davidfowl removed this from the 2.1.0-preview2 milestone Feb 21, 2018
@davidfowl
Copy link
Member

Closing in favor of #1475

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants