Skip to content

Establish new channel connection model using server listeners #484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2017

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Jun 2, 2017

This change refactors our existing channel model to move all connection
logic outside of the ChannelBase implementations so that the
language and debug client/service pairs can be simplified. This change
also allows us to remove a long-standing hack in our Host unit tests
which added an artifical delay to give the channel and MessageDispatcher
time to get established.

This change refactors our existing channel model to move all connection
logic outside of the ChannelBase implementations so that the
language and debug client/service pairs can be simplified.  This change
also allows us to remove a long-standing hack in our Host unit tests
which added an artifical delay to give the channel and MessageDispatcher
time to get established.
@daviwil daviwil added this to the 1.3.0 milestone Jun 2, 2017
@daviwil
Copy link
Contributor Author

daviwil commented Jun 2, 2017

The basic idea here is that connections should be established before creating an instance of a ChannelBase implementation. This simplifies client and server implementation since they don't have to deal with waiting for a connection before proceeding. The assumption is that the ChannelBase implementation is connected and fully established before being passed to a ProtocolEndpoint implementation (like LanguageServiceClient, etc).

/cc @mrward @kamilkosek since it affects the LanguageServiceClient class and how you establish a TcpSocketClientChannel. Check out this code for example on how to set up a LanguageServiceClient with the altered model:

https://github.com/daviwil/PowerShellEditorServices/blob/90afbeb689c7ddb8be360de8bbf14c7fd694725d/test/PowerShellEditorServices.Test.Host/LanguageServerTests.cs#L53

@daviwil
Copy link
Contributor Author

daviwil commented Jun 2, 2017

Not in a rush to merge this, I'll leave it open until later tomorrow in case anyone has questions or feedback!

@daviwil daviwil merged commit 0488a37 into PowerShell:master Jun 2, 2017
@daviwil daviwil deleted the new-connection-model branch June 2, 2017 15:02
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this pull request Feb 26, 2019
…find-ps-module-ui

Find module display quick pick list first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants